On Wed, May 30, 2012 at 4:18 AM, Andrew Deason <adea...@dson.org> wrote: > On Tue, 29 May 2012 11:05:51 +0200 > Bastien ROUCARIES <roucaries.bast...@gmail.com> wrote: > >> Could you please describe what you are trying to achieve. Flatten >> means some special stuff in the gif context. >> >> And do not use geometry but resize or thumbnail operator. > > I did not generate that command line invocation, so I can't really > explain the justification for it. It comes from the thumbnailing code in > Gallery, some imageboard software, and probably some other places. It > does not seem uncommon, and works as expected (at least, how I expected > it to work) in GraphicsMagick. > > I'm not sure I understand upstream's response, though... is he trying to > say that it is expected that the provided example generates a jpg that > is tens of thousands pixels wide and tall? Even though the -size and > -geometry options specified a size of 217x159? Using -resize instead of > -geometry doesn't seem to change this behavior, but '-layers merge' > does.
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. >> 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. Cheers, Vincent -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org