• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: BitMap data format and autorelease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BitMap data format and autorelease


  • Subject: Re: BitMap data format and autorelease
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 12 Mar 2008 17:11:46 +0000
  • Thread-topic: BitMap data format and autorelease

>
> On 12 Mar '08, at 9:09 AM, Trygve Inda wrote:
>
>> NSImage *           image = [NSImage imageNamed:@"colorTest"];
>> NSBitmapImageRep *  imageRep = [NSBitmapImageRep imageRepWithData:
>> [image
>> TIFFRepresentation]];

This comes from here:

http://www.cocoadev.com/index.pl?NSBitMapImageRep

The easiest way to get a guaranteed bitmap from an arbitrary NSImage is to
use TIFF as an intermediate representation. It's not fast but it gets the
job done.

NSData *tiff_data = [[NSData alloc] initWithData:[any_image
TIFFRepresentation]];
NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc]
initWithData:tiff_data];


What I need to do, is read a jpg... And get at the RGB data directly.

And

Create a pixel buffer directly (which I will fill with pixel data), then
make this some sort of image that I can draw over with semi-transparent text
and save the result to a new jpg.

None of this will ever appear on screen (at least in my app).

Trygve


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: BitMap data format and autorelease (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Where are the system spellchecker prefs stored?
  • Next by Date: Re: Where are the system spellchecker prefs stored?
  • Previous by thread: Re: BitMap data format and autorelease
  • Next by thread: Re: BitMap data format and autorelease
  • Index(es):
    • Date
    • Thread