Forums » C++ Framework » CCImage getData() RGBA infos , Android »
| Alex Corbi | CCImage getData() RGBA infos , Android | ||
|---|---|---|---|
|
Added by Alex Corbi 11 months ago
Hi Community, I am porting a game i did for iOS using cocos2d-iphone to Android. I need to extract the RGBA ( alpha channel inclusive ) pixel information from an Image stored in the Resources folder, i use the following code: // Extract pixel information from Image The problem is that the length of the layerPixels variable is width*height*3 , meaning RGB information, but i also need the alpha channel information. Do you know how to do it? i am using cocos2d-1.0.1-x-0.13.0-beta Thanks in advance. |
||
| James Chen | RE: CCImage getData() RGBA infos , Android | ||
|
Added by James Chen 11 months ago
Is it a jpeg image? If so, you need to make up alpha channel manually. |
(1-1/1)