defaults for gif creation
Posted: 2018-02-15T02:27:51-07:00
hi all
i'm using imagemagick with C++. i have couple of questions regarding gif creation. i create a gif like the following code:
i have 16 images (each 640x640), the resulting gif is 4.5 mb. i also created a gif from the command line with `convert *.jpg -delay 1 result.gif`. file size is still 4.5 mb but quality is better. the following are my questions:
* what are the defaults for creating gif from the command line so i can apply them to my c++ code?
* how can i reduce file size but maintain quality?
* is setting -colors to 128 enough to make the gif in 128 colors?
* how can i reduce the noise in created gifs?
thanks in advance.
i'm using imagemagick with C++. i have couple of questions regarding gif creation. i create a gif like the following code:
Code: Select all
std::vector<Magick::Image> frames;
for (int i = 0; i < fromImages.size(); ++i) {
Magick::Image img = fromImages[i].getImage();
img.animationDelay(10);
img.compressType(Magick::LZWCompression);
frames.push_back(img);
}
Magick::writeImages(frames.begin(), frames.end(), outPath);
* what are the defaults for creating gif from the command line so i can apply them to my c++ code?
* how can i reduce file size but maintain quality?
* is setting -colors to 128 enough to make the gif in 128 colors?
* how can i reduce the noise in created gifs?
thanks in advance.