ok, I am working on a project where the client wants to be able to upload images to his site. The problem: the files are inconsistent. They are different sizes, have no set naming structure, and are different formats - mostly jpeg, tiff, and png.
Resizing and renaming is easy enough through php, but the filetype is the problem, have any idea if/how I can convert the image from tiff or png to jpg using php?
__________________ Jason Corradino
Applications Developer, Interactive Support - Tribune Technology
J2EE Development, Script Tinkering - Develop, Support, and Maintain Tribune websites.
As far as I know, JPEG and TIFF coding don't come close to looking like eachother so I think that's a no-go. The smartest thing for you to do, is just simply sort them by type or let the customer upload regular images, since TIFF usually is way to big (print size, 300DPI).
One way you can try, is to find some online converter, but I guess that'll cost money. Sorry to burst your bubble, but I don't reckon it's possible. Perhaps the other Guru's might now something.
"Life is a bitch, take that bitch on a ride"
The Following User Says Thank You to ReSpawN For This Useful Post:
Indeed. You can download simple converters. Just make a small read-me for the client and he'll be able to all the work himself. On the other hand, if you're in for the money, just tell him to send you the pictures and you'll do it yourself.
You can use PHP's GD functions to load in the image (gif, png, tiff, whatever) and save it out in jpg format with only a couple of lines of code. Unless I'm missing the actual problem here, it seems a simple enough solution.