Imagemagick exec and convert

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.

+3
source share
2 answers

I cannot answer your questions directly, but thought that I would point you to several resources:

As for the best, exec or PHP extension, I asked this question a few months ago:

PHP ImageMagick Exec() PHP ?

Image Magick PHP :

http://www.php.net/manual/en/book.imagick.php

Image Magick Graphics Magick, , . Image Magick . , Flickr Etsy, :

http://www.graphicsmagick.org/

:

http://devzone.zend.com/1559/manipulating-images-with-php-and-graphicsmagick/

php.net:

http://php.net/manual/en/book.gmagick.php ( Image Magick)

+4

exec(), , Imagick ( , ), ( ), Imagick . Imagick - ; Imagick, , .

, Imagick / ? php, .

, http://valokuva.org/?cat=1 Imagick .

www.rubblewebs.co.uk/imagemagick php exec()

, , Imagick, basename. $ext - ? , , basename. $Ext .

, GD Imagick Imagemagick. . , . http://www.rubblewebs.co.uk/imagemagick/speed/Speed_tests_1.pdf

+1

All Articles