Let me explain what I'm trying to do, I am creating a command line tool with PHP that uses these programs to optimize images for the web ...
imagemagick to determine file type and convert unanimated gif to png
gifsicle to optimize animated gifsicle
jpegtran for optimizing jpg images
pngcrush for image optimization png
pngquant to optimize pngquant images in png8 format
pngout to optimize pngout images in png8 format
This is a rather difficult process to start, fortunately, this is done very rarely, but I still would like to optimize as much as I can.
Now it takes about 76 seconds to process about 12 images. So you can see that this is a slow process, imagine 100 images.
I would really like to somehow mark the image as somehow optimized, so when I download the image package, the first thing it does is run through ImageMagick to get the exact file type, it would be nice if I could somehow insert a message stating that this image is already optimized as much as it can be, and then when I read the image, if it detects a message that it will know, so as not to waste precious time doing this particular image through all THER program, if possible, it can significantly increase the speed.
Please help me, I'm not used to working with such images, is it possible, even if this is what is called, and how can I achieve it?
Thanks for any help
source share