Just looked at imagemanipulation closer.. and found a couple of bugs when using GD!!!
1.
Major
As far as I can see .. there is NO file type check if you want to rotate or flip an image..
only in editimage.php:
Code:
Content visible to verified customers only.
so IF you want to rotate a
gif image that
is in the $imgtypearray..
in functions_imageedit.php you have
imagecreatefromjpeg where there should be a switch($extension) or filetype check... and then imagecreatefromgif or png... AND what about bmp and swf.. etc.. there are i think close to 18 types in the imagetypearray...
2. it is also
resaved as jpg...
imagejpeg.... you
can save a gif as jpg.. but in that case you have to change the extension in the db... (or make another switch($extension) for saving..)
3. same with flip image!!
--> if its a non supported type.. there should be an error message.. or at least not allowing it to rotate or flip..
4.
imagerotate function is only existing in php 4.30 and higher..
So there should be check if the function exists
nice solution would be to do a
"flip both" if imagerotate does not exist and leave in imagetools only the option of rotating 180°) (what is what flip both does, only without using imagerotate)
QUICKFIX
so you dont get errors..
find in gallery/editimage.php:
Code:
Content visible to verified customers only.
and replace with:
Code:
Content visible to verified customers only.
Now the tools will only show if its a jpg.. and if your php version supports imagerotate... its not really satisfactory.. but it will give no errors.. ( added jpeg as file type that is NOT in the imagetypearray!!!)
more elegant could be not to use the function_exists part above and do a template edit to remove the rotation part, if the function imagerotate does not exist.. leaving the flip function only.. or to use an image rotation function that does not use imagerotate..
(but that goes beyond a quickfix)
Luc