mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 06:51:08 +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);
|
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
|
||||||
|
|
Loading…
Reference in a new issue