View Full Version : Handling Tif, SWF & PSD files for image upload
02-13-2006, 09:54 AM
Hi, I'd like to know how to handle & manipulate tif, swf & psd files while uploading an image.
Its quite easy to upload any file. But i need to manipulate them. Is there any way of converting these types to jpg/gif/png, then do the manipulation and then revert back to tif/swf/psd formats.
Any suggestions / ideas in this appreciated.
02-13-2006, 10:33 AM
what kind of file "manipulation" are you doing?
I'll tell you a couple things...there's no way on earth that you can change a .psd file into a flattened, compressed image and expect to convert it back into a .psd file when you;re done with it...(unless you're actually working inside Photoshop....and even then, you lose the layers)
Same with converting a .swf to a flat image and back....impossible
basically whatever you are doing isn;t practical....I suggest you do your file manipulation with the working Flash/Photoshop files BEFORE you upload them...
02-13-2006, 11:03 AM
Hi, thanx for the reply. Ok, basically i'd like to just convert psd or swf files to gif. Probably the first frame of .swf file or something like that, so that i can create a gif/jpeg thumbnail.
And, what about .tif images? I've seen a few image-hosting sites that support .tif format..?
is there a way of converting these swf/tif/psd to gif/jpg/png (any one)?
02-13-2006, 11:44 AM
google for ` imagemagick `, not sure about swf's (though there are other applications out there for those I am sure) but imagemacgick will convert tiff's and psd's to whatever you want, many *nix hosts have imagemagick installed and you can use it via php's exec function..
<?php exec('/usr/local/bin/convert /uploads/this.tiff /images/this.jpg');?>
simple as that.
02-14-2006, 07:33 PM
hi firepages, tnx for that. I did try imagemagick, n it rocks!
Now, i have my upload script coded in pure php for png/jpg/gif & wanna use imgmgk for tiff/bmp etc. Is it better to use imagemagick itself for gif/jpg?
Which is the better way of doing things? To use imgmagick only when its needed or to use it, since its installed on server?
02-14-2006, 10:24 PM
Well I would use imagemagick if it is installed, its far simpler (and less code) to use than say GD functions for simple operations (and can do some quite funky stuff as well) , but if you are writing re-distributable code then you have to consider that not all hosts will have it installed (though most *nix hosts will) especially windows based hosts (though imagemagick works fine on win32 as well).
02-15-2006, 03:26 AM
Thanks again :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.