Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Handling Tif, SWF & PSD files for image upload

    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.

    Thanks.

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,846
    Thanks
    21
    Thanked 157 Times in 148 Posts
    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...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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)?

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #5
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?

  • #6
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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).
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #7
    New Coder
    Join Date
    Dec 2005
    Posts
    24
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks again :-)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •