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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-10-2008, 10: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.usStumble this Post!Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 01: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 01:49 PM.
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-13-2008, 11:18 AM
Distinguished Member
 
Join Date: Jan 2008
Posts: 214
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 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.usStumble this Post!Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-13-2008, 01: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.usStumble this Post!Wong this Post!
Reply With Quote
Reply

Bookmarks

Webmaster Resources
UK WW SEO Tools
Find UK Hosts
 
The Forum Rules
Forum Rules - MUST READ
 
Site Of the Month
BizzFace
Nominate site of the month
 
Tag Cloud
.biz .us 100 pound 15000+ mobile wallpapers 19000+ mobile logos article database article site bagalibaba@hotmail.com bidding bidding directory bid directory bid for position buy a website cheap domains cmodz dabangla directory estdomains free space glype glype theme google http://www.bagalibaba.com international seo java games links marketing phones electronics promo promotion proxy script proxy theme purchase a website ranking 3 seo seo expert seo services site dump social web space theme three year old web vebtools.com for sale videos web directory web hosting website development wordpress work at home

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
Forum Jump



All times are GMT. The time now is 10:26 PM.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151