Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

need help with imagemagick

Discussion in 'Design' started by dman_2007, Apr 10, 2008.

  1. dman_2007

    dman_2007 Guest

    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.
  2. dman_2007

    dman_2007 Guest

    Ok, found out how to do it.

    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: Apr 12, 2008
  3. smeagain

    smeagain Distinguished Member Webmaster

    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??
  4. dman_2007

    dman_2007 Guest

    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,


Featured Resources (View All)

Share This Page