Sign in to follow this  
dmacnevin

NSBitmapImageRep

Recommended Posts

dmacnevin    122
Hey there, I'm currently working on creating an application that uses bump mapping using nehe's tutorial 22 as a guideline and I ran into a small issue with image storing and manipulation that I was hoping someone could help me out with. (I am also using a mac, so this question is actually mac specific) I am currently using NSBitmapImageRep to store the image in my program, but I recently read that NSBitmapImageRep pre-multiplies the data if there is an alpha component. (That is it multiplies the source bitmap RGB pixels by the alpha value before it stores the image in NSBitmapImageRep). In nehe's tutorial he modifies the RGB values of the bitmap before it was stored and I was wondering if I would still be able to accomplish this step using NSBitmapImageRep because of the pre-multiplication step that NSBitmapImageRep does. I was also reading that if you want to be able to modify the bitmap pixel values then this is not the way to go, and that the Quartz function CGImageCreate should be used along with kCGImageAlphaLast. If anyone has any ideas or comments on this, it would be greatly appreciated. Thanks Danielle

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this