Webmaster Forum
Go Back   Webmaster Forums UK SEO SEM Webmaster Community Forum > Web Design and Website Development > Web Design Web Graphics
Register FAQ Members List Downloads Calendar Search Today's Posts Mark Forums Read Webmaster Resources Webmaster Blogs

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-10-2008, 09:23 AM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default need help with imagemagick

I am using convert command with -resize option to resize uploaded images into small png images. The problem is that if anyone uploads an animated gif file, then the convert command outputs more then one png file (exact number depends on the number of frames in the animated gif file). Anyone knows how i can get it to output only one file? Preferably the first frame of the animated gif file resized according to the geometry specified on the command line.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 12:20 PM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default

Ok, found out how to do it.

Quote:
convert inputfile[0] -resize 240x60 outputfile
works with image formats other than gif as well. The number in square bracket ( 0 in the command given above) is the frame number in the animated file. Frames are numbered starting from 0.

Last edited by dman_2007; 04-12-2008 at 12:49 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
  #3 (permalink)  
Old 04-13-2008, 10:18 AM
Distinguished Member
 
Join Date: Jan 2008
Posts: 163
iTrader: 0 / 0%
smeagain is on a distinguished road
Default

dman, does that resize using your code maintain "Aspect Ratio" or does it always (as in your quoted case( resize to a 4:1 width to height ration??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
  #4 (permalink)  
Old 04-13-2008, 12:57 PM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default

Aspect ratio is maintained, the geometry specified in the command specifies the maximum height and width. If you want to resize the image to that exact geometry without maintaining aspect ratio then append ! tio the geometry. For example,

Quote:
convert inputfile[0] -resize 240x60! outputfile
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Stumble this Post!
Reply With Quote
Reply


Useful Resources & Sites
Search Engine Marketing Company
UK Web Hosting
Build One Way Links
 
 
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:19 AM.

UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons.
Subscribe to our feeds   Subscribe to our feeds

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0