Edit: This is what I am trying to do:
Example workflow: (20) "100x100" png files -> append into (1) "100x2000" png -> convert to gif -> split back into (20) "100x100" gif files.
I don't know how I would do that last step. I am working on a windows laptop.
Why do I want to do that last step? Because...
Recently I have been trying various image editing tools to create animated gifs. I am using GIMP as my main editor, but found the built-in conversion to 256-color gif to be mediocre. Tried gmic plugin, did not like the results. Tried ximagic plugin, great but it's shareware and I think only works on single image at a time. Tried RIOT plugin, good but also only works on single image at a time. Tried gifsicle, too speckled. So trying imagemagick now, the gif results look better than other free tools except for RIOT. Not sure what quantization method IM uses (is it octree?), but the neuquant method available from RIOT still looks better to me.
So what I am thinking now is create/edit my project in gimp, then save the finished layers/frames as separate png files. Then I "append" all the png frames into 1 single image with imagemagick. Then I can color quantize the appended file into 256 color gif with RIOT instead of IM. But this would only be useful if I can split the appended image back into layers/frames after.
How can I do a reverse "append"? (color quantization)
How can I do a reverse "append"? (color quantization)
Last edited by imhere on 2013-01-05T23:10:58-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How can I do a reverse "append"? (color quantization)
convert animation.gif -coalesce images_%d.png
or
convert animation.gif -coalesce +adjoin images_%d.gif
PNG does not support multi-frame files, so it does not need to have +adjoin (though it will not hurt to include it anyway).
see
http://www.imagemagick.org/script/comma ... p#coalesce
http://www.imagemagick.org/script/comma ... php#adjoin
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_basics/#coalesce
or
convert animation.gif -coalesce +adjoin images_%d.gif
PNG does not support multi-frame files, so it does not need to have +adjoin (though it will not hurt to include it anyway).
see
http://www.imagemagick.org/script/comma ... p#coalesce
http://www.imagemagick.org/script/comma ... php#adjoin
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_basics/#coalesce
Re: How can I do a reverse "append"? (color quantization)
Thanks for the reply. Hmm I don't think coalesce will do what I am thinking of. My understanding is coalesce reverses whatever was done by "-layers optimize". But what I want to do is reverse what an "append" does. Append takes multiple images and concats them into one single image. I want to further procees this single image then split it back into multiple images. Example workflow: (20) "100x100" png files -> append into (1) "100x2000" png -> convert to gif -> split back into (20) "100x100" gif files.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How can I do a reverse "append"? (color quantization)
convert -crop 1x20@ x_%02d.gif
snibgo's IM pages: im.snibgo.com
Re: How can I do a reverse "append"? (color quantization)
Thank you snibgo. Yes that is what I was looking for. I did see the commands crop/chop in the command-line options page, but thought it would have to be recalculated/repeated manually. After looking further into crop command, the examples page does a good job visually showing what is capable.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How can I do a reverse "append"? (color quantization)
For some reason, the "@" facility isn't mentioned on http://www.imagemagick.org/script/comma ... s.php#crop . As it is so useful, perhaps whoever maintains that page might mention it. (Hint, if anyone is listening.)
snibgo's IM pages: im.snibgo.com
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How can I do a reverse "append"? (color quantization)
It is metioned but further down. the '@' was one of the later additions added to the operator
Cropping into roughly Equally Sized Divisions
http://www.imagemagick.org/Usage/crop/#crop_equal
It also has a lot of extra features, such as gaps, and overlaps, as well how how 'edges' should be handled.
more specifically see
Separating Spaced-out Tiling Images
http://www.imagemagick.org/Usage/crop/#crop_spaced
Cropping into roughly Equally Sized Divisions
http://www.imagemagick.org/Usage/crop/#crop_equal
It also has a lot of extra features, such as gaps, and overlaps, as well how how 'edges' should be handled.
more specifically see
Separating Spaced-out Tiling Images
http://www.imagemagick.org/Usage/crop/#crop_spaced
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How can I do a reverse "append"? (color quantization)
So it is. My apologies.anthony wrote:It is metioned but further down.
snibgo's IM pages: im.snibgo.com