User tests: Successful: Unsuccessful:
Hi All,
This PR is to add flip functionality to JImage class, which is using quite lot in Joomla image manipulations.
Sample usage of this method is as follows:
$JImage = new JImage($file);
try
{
$image = $JImage->flip($mode, true);
$image->toFile($file);
return true;
}
catch (Exception $e)
{
$app->enqueueMessage($e->getMessage(), 'error');
}
Mode of flipping can have 3 values which are defined in GD library:
Hope this will help for developers to do more with JImage!
Thank you!
Labels |
Added:
?
|
Hi @C-Lodder ,
This is not just for that. Anyone can use this feature quite similar way as rotate, resize etc.
That's the reason why I pushed this separately.
You can have a look at Media Editor for an example use of this.
[ Ref: Buddhima@eed0111
administrator/components/com_media/controller/editor/flip.php calls model's flipImage($id, $mode)
and see model's code : administrator/components/com_media/model/editor.php
]
Thank you!
@phproberto Thanks for pointing that out. Can you check the current code?
Thank you!
Labels |
Added:
?
|
Milestone |
Added: |
||
Status | Pending | ⇒ | Ready to Commit |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I'd add information on the $mode
parameter in the docblock.
Either short info or reference to [http://php.net/imageflip#refsect1-function.imageflip-parameters]
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-25 00:17:38 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Have been trying to test this but constantly getting a blank screen (even with error reporting set to Development).
Wrapped the code in a function and defined the path of an image correctly. Could you please confirm a test you've done with an image that comes shipped with Joomla?