0.99.5-rc Android CCSprite not support jpg?

0.99.5-rc Android CCSprite not support jpg?
0.0 0


I am using jpg image as sprite in the helloword sample, it works well in the vs2008 and iphone. But when I compile the android apk and setup in my android device.
The jpg sprite can not display.

Does somebody have similiar experience in jpg sprite displaying.

// add “HelloWorld” splash screen"
CCSprite* bkSprite = CCSprite::spriteWithFile(“nav bg.jpg”);
// position the sprite on the center of the screen
bkSprite~~>setPosition );
// add the sprite as a child to this layer
this~~>addChild(bkSprite, 0);


jpeg format isn’t well tested. Most developers perfer to use PNG because its Alpha bits.
As far as I know, libjpeg is unstable on win32, take a look at bug #190.
Maybe you met the same problem.


jpeg is not supported now because the libjpeg of android removed some standard jpeg functions.


I have a project want to port from iphone to android.
In the iphone we use 60 jpg image(30kb). It almost 17M after we compiled into apk.
I have convert this 60 jpg image into png(900kb), it will be 70M apk.

If android can not support jpg currently, can we have other solution which generate small apk with some other image format which android cocos2d-x can support?


Wow。Thank you very much
You are vey effective team. I have see this issue have been resolved.
[android] fixed #353: support jpg on android


Thanks 志云. Your compliment is our motivation!