Coverting image formats to 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
DrPL
Forum Commoner
Posts: 26
Joined: Wed Oct 07, 2009 4:22 pm

Coverting image formats to png

Post by DrPL »

Hi,
Sorry for the terse form of this message, I am trying to code while coping with a bereavment. Life goes on, "they" say; well maybe life sucks.

To ask my php question - is there a simple way to convert jpeg and gif files imported using
a form, to png format? All the forums I've frequented says that its a matter of loading the
relevant file and then displaying it using imagepng(...), but I don't want to display it straight away, I want to perform some further manipulation on the converted png before I display it.

Hopefully this makes sense to someone

Yours

Paul
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Coverting image formats to png

Post by requinix »

imagepng can save to a file too. Don't have to output the image immediately.
DrPL
Forum Commoner
Posts: 26
Joined: Wed Oct 07, 2009 4:22 pm

Re: Coverting image formats to png

Post by DrPL »

Thanks, I'd forgotten that. Is there any way to hold an image in memory rather than having to output to a file, and then reload it?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Coverting image formats to png

Post by requinix »

Reload... what?
Post Reply