[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnustep-cvs] Commit Update
From: |
Alexander Malmberg |
Subject: |
Re: [Gnustep-cvs] Commit Update |
Date: |
Tue, 27 Jul 2004 01:07:26 +0200 |
Fred Kiefer wrote:
> Adam Fedor wrote:
> > + image = [NSApp applicationIconImage];
> > + rep = (NSBitmapImageRep *)[image bestRepresentationForDevice:nil];
> > +
> > + if (![rep isKindOfClass: [NSBitmapImageRep class]])
> > + return 0;
> > +
> > + if ([rep bitsPerSample] != 8
> > + || (![[rep colorSpaceName] isEqual: NSDeviceRGBColorSpace]
> > + && ![[rep colorSpaceName] isEqual: NSCalibratedRGBColorSpace])
> > + || [rep isPlanar])
> > + return 0;
> > +
>
> Seeing this horrible code being reused once more, makes me ask again
> when the art backend will be supporting the [initWithFocusedViewRect:]
> call? With that we could have a much more usefull code (See my last mail
> on this):
Although it would help in some ways, most of these checks would have to
stay anyway. -initWithFocusedRect: only guarantees that you'll get an
NSBitmapImageRep, it gives no guarantee that the resulting rep has any
particular bit depth or color space. You'd still need to either handle
those cases or detect and ignore them.
- Alexander Malmberg