Convert TIFF and BMP to JPG or PNG

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
BaBooN
Forum Newbie
Posts: 2
Joined: Mon Apr 02, 2007 12:43 pm

Convert TIFF and BMP to JPG or PNG

Post by BaBooN »

Hi,

Does anybody know of a script to convert TIFF or BMP to JPG or PNG?

I need this for a Flash project, I am a beginner in PHP and have no idea how this can be done. I have adapted a PHP code to send an image to Flash as an array (BitmapData in Flash), without saving the actual file on the server (and this is what I'm looking for with this script). However, I don't know how to code the conversion.

Can someone please help me with this?

Thanks.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You can't do it natively in PHP alone without some seriously hard work (eg writing something to open and decode the BMp and TIFF file formats) but I think ImageMagick can do it. There's lots of tutorials for ImageMagick around the internet.

Question though .. why not just send a series of JPG or PNG images to your Flash movie? It'd probably be much easier, and a bit faster.
BaBooN
Forum Newbie
Posts: 2
Joined: Mon Apr 02, 2007 12:43 pm

Post by BaBooN »

Yes, it would be better. However, this is for a client who apparently uses it as an online scanner application... I don't know for sure what. However, he specifically asked this application to be able to also work with TIFF and BMP.

But thanks for the tip though, I ended up reading ImageMagick tutorials just as I received your reply :).

Hopefully, I'll manage to understand something from all the tutorials available.

Thanks again.
Post Reply