• 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
Loading an bitmap from NSImage with alpha?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading an bitmap from NSImage with alpha?


  • Subject: Loading an bitmap from NSImage with alpha?
  • From: Jonathan del Strother <email@hidden>
  • Date: Wed, 17 Mar 2004 01:05:37 +0000

I'm trying to load a .tga file with an alpha channel into an OpenGL
texture.

To do so, I'm loading the image with NSImage and getting the bitmap
data with TIFFRepresentation :

NSImage* image = [[NSImage alloc]
initWithContentsOfFile:@"Particle.tga"];
NSBitmapImageRep* bitmap = [[NSBitmapImageRep alloc]
initWithData:[image TIFFRepresentation]];


However, [bitmap hasAlpha] now returns false - either NSImage isn't
loading it to start with, or it's not getting transferred with the
TIFFRepresentation. Any ideas what's wrong?

Thanks,
Jon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Loading an bitmap from NSImage with alpha?
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: "Designated Initializer" pattern
  • Next by Date: Drag + Drop in Tableview using NSArrayController
  • Previous by thread: Re: "Designated Initializer" pattern
  • Next by thread: Re: Loading an bitmap from NSImage with alpha?
  • Index(es):
    • Date
    • Thread