Temporary bug fix to make it work again for non-tiff files

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10171 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2001-06-12 22:19:10 +00:00
parent 918c047557
commit 2aeff3e0f0

View file

@ -624,13 +624,16 @@
NSLog(@"Extension missing from filename - '%@'", filename); NSLog(@"Extension missing from filename - '%@'", filename);
return nil; return nil;
} }
/* This is a quick hack to make it work - if the extension is that
if ([[self imageUnfilteredFileTypes] indexOfObject: ext] != NSNotFound) of a tiff file, we init with data */
if ([ext isEqualToString: @"tiff"] || [ext isEqualToString: @"tif"])
{ {
NSData* data = [NSData dataWithContentsOfFile: filename]; NSData* data = [NSData dataWithContentsOfFile: filename];
return [self imageRepsWithData: data]; return [self imageRepsWithData: data];
} }
/* Otherwise, we attempt using wraster classes to load the file
(which could be png, etc) */
array = [NSMutableArray arrayWithCapacity: 2]; array = [NSMutableArray arrayWithCapacity: 2];
images = 0; images = 0;
do do