mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 20:49:13 +00:00
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:
parent
918c047557
commit
2aeff3e0f0
1 changed files with 5 additions and 2 deletions
|
@ -624,13 +624,16 @@
|
|||
NSLog(@"Extension missing from filename - '%@'", filename);
|
||||
return nil;
|
||||
}
|
||||
|
||||
if ([[self imageUnfilteredFileTypes] indexOfObject: ext] != NSNotFound)
|
||||
/* This is a quick hack to make it work - if the extension is that
|
||||
of a tiff file, we init with data */
|
||||
if ([ext isEqualToString: @"tiff"] || [ext isEqualToString: @"tif"])
|
||||
{
|
||||
NSData* data = [NSData dataWithContentsOfFile: filename];
|
||||
return [self imageRepsWithData: data];
|
||||
}
|
||||
|
||||
/* Otherwise, we attempt using wraster classes to load the file
|
||||
(which could be png, etc) */
|
||||
array = [NSMutableArray arrayWithCapacity: 2];
|
||||
images = 0;
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue