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.
Thanks
// add “HelloWorld” splash screen"
CCSprite* bkSprite = CCSprite::spriteWithFile(“nav bg.jpg”);
bkSprite~~>setScaleX;
bkSprite~~>setScaleY(0.2);
// 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.
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?