diff --git a/ChangeLog b/ChangeLog index f54b43217..51594163d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-12 Eric Wasylishen + + * Source/GSImageMagickImageRep.m: Log warnings from ImageMagick + instead of giving up. + 2011-07-12 Eric Wasylishen * Source/GSGuiPrivate.h: New rounding rounding function diff --git a/Source/GSImageMagickImageRep.m b/Source/GSImageMagickImageRep.m index be5596aef..57150a7d0 100644 --- a/Source/GSImageMagickImageRep.m +++ b/Source/GSImageMagickImageRep.m @@ -34,6 +34,7 @@ #import #import #import +#import #import "AppKit/NSBitmapImageRep.h" #import "AppKit/NSGraphics.h" #import "AppKit/NSPasteboard.h" @@ -124,23 +125,25 @@ images = BlobToImage(imageinfo, [data bytes], [data length], exception); - if (exception->severity == UndefinedException) + if (exception->severity != UndefinedException) { - for (image = images; image != NULL; image = image->next) + NSWarnLog(@"ImageMagick: %s", GetLocaleExceptionMessage(exception->severity, exception->reason)); + } + + for (image = images; image != NULL; image = image->next) + { + NSBitmapImageRep *bmp = [[self class] imageRepWithImageMagickImage: image]; + if (bmp != nil) { - NSBitmapImageRep *bmp = [[self class] imageRepWithImageMagickImage: image]; - if (bmp != nil) - { - [reps addObject: bmp]; - } - - if (!allImages) - { - break; - } + [reps addObject: bmp]; + } + + if (!allImages) + { + break; } } - + DestroyExceptionInfo(exception); DestroyImageInfo(imageinfo); DestroyImage(images);