* Source/GSImageMagickImageRep.m: Log warnings from ImageMagick

instead of giving up.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33540 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-07-13 02:46:12 +00:00
parent 22bfbcc946
commit 237476cb79
2 changed files with 21 additions and 13 deletions

View file

@ -1,3 +1,8 @@
2011-07-12 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSImageMagickImageRep.m: Log warnings from ImageMagick
instead of giving up.
2011-07-12 Eric Wasylishen <ewasylishen@gmail.com>
* Source/GSGuiPrivate.h: New rounding rounding function

View file

@ -34,6 +34,7 @@
#import <Foundation/NSData.h>
#import <Foundation/NSTask.h>
#import <Foundation/NSProcessInfo.h>
#import <GNUstepBase/NSDebug+GNUstepBase.h>
#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);