Hello, On Sun, Jun 3, 2012 at 11:02 PM, Andrew Deason <adea...@dson.org> wrote: >> The thing is that, if I understand correctly, when you're using >> -resize 217x159!, you resize the first layer to the desired size (ie >> you multiply its size by a very large factor), but resize the other >> ones to scale too (ie the second image, of size 217x159 gets scaled to >> about the square of that). With -flatten, you flatten the selected >> frames on the canvas, which happen to be the largest image (ie this >> 217x159 squared). This is the expected behaviour. > > It is not expected for me that resizing the given image to 217x159 > yields a result larger than 217x159, since that is not how every single > other image processing library I can find works (including, I believe, > imagemagick version <= 5). This is not restricted to the 'convert' > invocation given... I mean, for CloneImage (where the patch deals with), > if I give 217 columns and 159 rows, I expect to get that back. > > That is, without flattening, resizing the given GIF to, say, half or > double the canvas height/width with any other library generates an image > approximately a quarter or quadruple the size. With the current version > of imagemagick, you get huge results. (e.g., something like > 'convert foo.gif -resize 108x79 bar.gif')
No exactly. You get that: foo.gif GIF 1x4 217x159+216+125 8-bit PseudoClass 2c 63B 0.000u 0:00.000 bar.gif[1] GIF 20x79 4340x3140+4320+2469 8-bit PseudoClass 32c 499B 0.000u 0:00.000 You scaled the first frame to 20x79, and you scaled the canvas accordingly. Why would you want that scaling apply only to part of the image ? This wouldn't make any sense ! >> >> Are you trying to merge all the layer ? something like this : >> >> >> >> convert -resize '217x159!' -layers merge  'foo.gif[0]' foo.jpg >> > >> > The -layers option makes this incompatible with older ImageMagick >> > releases, and GraphicsMagick, which is possibly why various software >> > uses the other invocation. >> >> Try this then: >> >> convert 'foo.gif[0]' -flatten -resize '217x159!' foo.jpg >> >> This does the resizing once all layers have been merged. > > I can't even verify that this does what you say (though I assume you are > correct), since it takes too much memory to run on my machine. I'm surprised, as on mine this is instantaneous. Could you try with the newer imagemagick from unstable, please ? Cheers, Vincent -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org