File: programming/cocoa/Filie.zip/Filie/UliKit/NSImage IconRef.m


//
//  NSImage+IconRef.m
//  testapp
//
//  Created by Uli Kusterer on 09.02.05.
//  Copyright 2005 M. Uli Kusterer. All rights reserved.
//
 
#import "NSImage+IconRef.h"
 
 
// -----------------------------------------------------------------------------
//  Expatriates from Troy Stephens' IconFamily class:
// -----------------------------------------------------------------------------
'icns''IKit'// Get information about the bitmapImageRep.
//    BOOL hasAlpha       = [bitmapImageRep hasAlpha];
//    int numberOfPlanes  = [bitmapImageRep numberOfPlanes];
//    int bytesPerPlane   = [bitmapImageRep bytesPerPlane];
// Make sure bitmap has the required dimensions.
// So far, this code only handles non-planar 32-bit RGBA, 24-bit RGB and 8-bit grayscale source bitmaps.
    // This could be made more flexible with some additional programming...
"get8BitMaskFromBitmapImageRep:requiredPixelSize: returning NULL due to isPlanar == YES""get8BitMaskFromBitmapImageRep:requiredPixelSize: returning NULL due to bitsPerSample == %d""get8BitMaskFromBitmapImageRep:requiredPixelSize: returning NULL due to samplesPerPixel == %d, bitsPerPixel == %"// Get information about the bitmapImageRep.
//    BOOL hasAlpha       = [bitmapImageRep hasAlpha];
//    int numberOfPlanes  = [bitmapImageRep numberOfPlanes];
//    int bytesPerPlane   = [bitmapImageRep bytesPerPlane];
// Make sure bitmap has the required dimensions.
// So far, this code only handles non-planar 32-bit RGBA and 24-bit RGB source bitmaps.
    // This could be made more flexible with some additional programming to accommodate other possible
    // formats...
"get32BitDataAtPixelSize: returning NULL due to isPlanar == YES""get32BitDataAtPixelSize: returning NULL due to bitsPerSample == %d"// Each pixel is 3 bytes of RGB data, followed by 1 byte of
						// alpha.  The RGB values are premultiplied by the alpha (so
						// that Quartz can save time when compositing the bitmap to a
						// destination), and we undo this premultiplication (with some
						// lossiness unfortunately) when retrieving the bitmap data.
"get32BitDataAtPixelSize: returning NULL due to samplesPerPixel == %d, bitsPerPixel == %"

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.