And test is ok, I can get the CCTexture2D object.
but the way isn’t my think result.
because I own one file call “imageObject.data”,then it own many images in the data.
so I do:
// save the memory
>
loadImageFile( “imageObject.data” );
>
// get image from 0 index
>
BYTE rawData = getImageFromIndex;
>
CCImageimg->initWithImageData( rawData, width*height, CCImage::kFmtRawData, width, height );
>
CCTexture2D* tex = CCTextureCache::sharedTextureCache()>addUIImage;
>
// get image from 1 index
>
BYTE rawData2 = getImageFromIndex;
>
CCImageimg2>initWithImageData( rawData2, width*height, CCImage::kFmtRawData, width, height );
>
CCTexture2D* tex = CCTextureCache::sharedTextureCache()->addUIImage( img2, “imageName_2” );
but now “imageName_1” and “imageName_2” can’t so use, i must name it call “imageObject.data”.
because these images separated to memory address, then they don’t have separated to many files in the hard disc.