mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:10:38 +00:00
Remove obsolete libwraster image loading hacks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18533 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
108986ee7d
commit
c172a7ed18
3 changed files with 29 additions and 100 deletions
|
@ -182,24 +182,20 @@ static Class NSImageRep_class = NULL;
|
|||
else
|
||||
return nil;
|
||||
|
||||
// This is a GNUstep extension for special file types
|
||||
if ([rep respondsToSelector: @selector(imageRepsWithFile:)])
|
||||
return [rep imageRepsWithFile: filename];
|
||||
else
|
||||
{
|
||||
NSData* data;
|
||||
|
||||
data = [NSData dataWithContentsOfFile: filename];
|
||||
if ([rep respondsToSelector: @selector(imageRepsWithData:)])
|
||||
return [rep imageRepsWithData: data];
|
||||
else if ([rep respondsToSelector: @selector(imageRepWithData:)])
|
||||
{
|
||||
NSImageRep *imageRep = [rep imageRepWithData: data];
|
||||
|
||||
if (imageRep != nil)
|
||||
return [NSArray arrayWithObject: imageRep];
|
||||
}
|
||||
}
|
||||
{
|
||||
NSData* data;
|
||||
|
||||
data = [NSData dataWithContentsOfFile: filename];
|
||||
if ([rep respondsToSelector: @selector(imageRepsWithData:)])
|
||||
return [rep imageRepsWithData: data];
|
||||
else if ([rep respondsToSelector: @selector(imageRepWithData:)])
|
||||
{
|
||||
NSImageRep *imageRep = [rep imageRepWithData: data];
|
||||
|
||||
if (imageRep != nil)
|
||||
return [NSArray arrayWithObject: imageRep];
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
@ -232,13 +228,13 @@ static Class NSImageRep_class = NULL;
|
|||
}
|
||||
else
|
||||
return nil;
|
||||
|
||||
|
||||
if ([rep respondsToSelector: @selector(imageRepsWithData:)])
|
||||
return [rep imageRepsWithData: data];
|
||||
else if ([rep respondsToSelector: @selector(imageRepWithData:)])
|
||||
{
|
||||
NSImageRep *imageRep = [rep imageRepWithData: data];
|
||||
|
||||
|
||||
if (imageRep != nil)
|
||||
return [NSArray arrayWithObject: imageRep];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue