| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Subscribe and Support WebmasterWorld|
|PHP: How to convert all image formats to JPG|
| 5:26 pm on Dec 8, 2008 (gmt 0)|
I'm tired of Googling. If anyone can help me with this I would really appreciate it.
Is there an easy way to convert all images (PNG, GIF, BMP,...) to simple JPG format using GD or MagickWand?
Something like this:
1) upload image001 (PNG, GIF, BMP,...)
2) check image format image001
3) convert to image001.jpg
Thanks a lot.
| 1:30 am on Dec 9, 2008 (gmt 0)|
A quick G search results in many applications (outside of PHP) that do this task. I would try to take advantage of them using system() calls. They will probably be faster, too.
| 10:42 am on Dec 10, 2008 (gmt 0)|
When you have MagickWand installed, you also have ImageMagick installed, which comes with the very handy 'convert' command.
A simple system('convert /path/to/image001.BMP /path/to/image001.jpg') should do the trick.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
© Webmaster World 1996-2014 all rights reserved