tif to png with GD2
Moderator: General Moderators
tif to png with GD2
Does anyone know how to convert tif to png on the fly with PHP using GD2?
I think imagemagick can do this.
Thanks
I think imagemagick can do this.
Thanks
Last edited by hongco on Mon May 30, 2005 4:39 pm, edited 1 time in total.
So you know that it's not possible in GD2 .. yet you still posted the question.hongco wrote:exactly! and I already know how to do that with imagemagick, but the problem with imagemagick is that you have to allow system command in php and turn off safemode in php.ini ...phpScott wrote:for clarification GD or GD2 doen't support tiff files.
Err..
Ok.
you are a difficult one, aren't you? haha j/k
at some point in your life, you might be wondering...hmm...."I know this one could not be done by such and such way, but do I know that for sure..maybe someone out there just figure out the new way"
That's the reason why inventions get invented every single day.
Furthermore, do not under-estimate the value of discussion. My question may be asked again by someone? and the answer you gave me can help them too.
Get a beer and keep yourself cool

at some point in your life, you might be wondering...hmm...."I know this one could not be done by such and such way, but do I know that for sure..maybe someone out there just figure out the new way"
That's the reason why inventions get invented every single day.
Furthermore, do not under-estimate the value of discussion. My question may be asked again by someone? and the answer you gave me can help them too.
Get a beer and keep yourself cool
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Not necessarily. You could post files in a certain directory and have a batch/cron process perform conversions. OK you would potentially have a slight time delay if part of a "workflow" (i.e where the PHP copies the file to the directory) but it could be a potential solution.is that you have to allow system command in php and turn off safemode in php.ini
Although not part of your question, but a I thought I'd mention it for completeness.. I have had problems with converting uploaded JPG to TIFF with ImageMagick (toggle doesn't seem to work) to be read on a Mac (Quark) due to Mac's requiring big-endian and Windows assuming little-endian. In the end I had to use the Tifflib library to correct it.