try
{
current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, &exceptionInfo);
+
+ if (!first) first = current;
+
+ current->previous = previous;
+ current->next = 0;
+
+ if ( previous != 0) previous->next = current;
+ previous = current;
}
catch(Magick::Warning warning) {
synfig::warning("exception '%s'", warning.what());
}
-
- if (!first) first = current;
-
- current->previous = previous;
- current->next = 0;
-
- if ( previous != 0) previous->next = current;
- previous = current;
}
return first;
try
{
- // check whether this file format supports multiple-image files
- Magick::Image image(*(images.begin()));
- image.fileName(filename);
- try
+ bool multiple_images = images.size() != 1;
+ bool can_adjoin = false;
+
+ if (multiple_images)
{
- SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo);
- }
- catch(Magick::Warning warning) {
- synfig::warning("exception '%s'", warning.what());
+ // check whether this file format supports multiple-image files
+ Magick::Image image(*(images.begin()));
+ image.fileName(filename);
+ try
+ {
+ SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo);
+ can_adjoin = image.adjoin();
+ }
+ catch(Magick::Warning warning) {
+ synfig::warning("exception '%s'", warning.what());
+ }
}
// the file type is now in image.imageInfo()->magick and
// image.adjoin() tells us whether we can write to a single file
- if (image.adjoin())
+ if (can_adjoin)
{
synfig::info("joining images");
unsigned int delay = round_to_int(100.0 / desc.get_frame_rate());
// insertImages(&images, new_images);
#endif
}
- else
+ else if (multiple_images)
{
// if we can't write multiple images to a file of this type,
// include '%04d' in the filename, so the files will be numbered
filename = (filename_sans_extension(filename) + ".%04d" + filename_extension(filename));
}
- synfig::info("writing %d images to %s", images.size(), filename.c_str());
+ synfig::info("writing %d image%s to %s", images.size(), images.size() == 1 ? "" : "s", filename.c_str());
try
{
Magick::writeImages(images.begin(), images.end(), filename);
}
bool
-magickpp_trgt::start_frame(synfig::ProgressCallback *callback)
+magickpp_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused)))
{
previous_buffer_pointer = start_pointer;
}
Color*
-magickpp_trgt::start_scanline(int scanline)
+magickpp_trgt::start_scanline(int scanline __attribute__ ((unused)))
{
return color_buffer;
}