I recently started using imagemagick with php and I'm relatively new to both IM and PHP. So, I'm here to ask for help / suggestions.
First
If it can be said that the user uploads a gif or png image to my site, and I want it to be converted to jpg, are there any like, for example. $image->convert($file,'.jpg)
or is the convert command available only through exec()? e.g. exec(convert picture.pngto picture.jpg)
Second
What should I do if the user uploads gif / png to the site again and I resize the image to the specified width / height and write the image with the writeImage IM function as follows:
$image->writeImage(basename.$ext)where $ext= jpg. Will this work correctly, is this a good practice? I guess it will only rename it, but still, I don't see a problem in this ... oO
Sorry for another question, I'm not very familiar with exec, it is better to use imagemagick with help exec(), does it improve speed, loading, etc.
inrob source
share