hey all,
how comes that 8bit PNGs dont show correctly on iOS? its replaced with a violet square.
what’s the deal? thanks! [import]uid: 90610 topic_id: 31824 reply_id: 331824[/import]
hey all,
how comes that 8bit PNGs dont show correctly on iOS? its replaced with a violet square.
what’s the deal? thanks! [import]uid: 90610 topic_id: 31824 reply_id: 331824[/import]
I’m pretty sure this is an iOS problem. I wrote a game w/ Torque 2D and a different game with Corona SDK and in both cases I goofed (head slap) and had an 8-bit PNG (an icon in both cases). In both cases the image did not display properly on iOS devices. This leads be to believe that for some reason iOS or iOS devices do not like 8-bit images. Truly frustrating was the fact that I had no problem on Android devices and didn’t catch the issue till after my game was released.
Note: If anyone has a technical/exact answer I’m looking forward to hearing too.
Cheers,
Ed [import]uid: 110228 topic_id: 31824 reply_id: 127010[/import]
Probably you’re right. i just don’t get that i can fetch app icons that cant be displayed on the device
[import]uid: 90610 topic_id: 31824 reply_id: 127027[/import]
We recently (within the last month or 2) added better image support on iOS and Mac which included 8-bit png. However, PNG is a really complicated format and has dozens upon dozens of variations. We use Apple’s decoder on Mac/iOS. If Apple has a problem, then we inherit that problem. We do know some 8-bit PNGS images work.
But we don’t encourage the use of 8-bit PNGs. (We don’t really say we support them, but we improved the support because we knew some people were scraping web feeds where they can’t control the image format/)
Generally 8-bit PNGs (I’m really talking about the indexed image support using color palettes) are a bad idea on modern hardware. This is why iOS doesn’t like them. Most video hardware over the past 10-15 years is now specifically optimized to handle R,G,B,A components separately. Each component is given a specific number of bits in the hardware to represent a color value. The old school color palette technique was designed before these days were graphics were done mostly on generic CPUs, not GPUs. The trick was that colors were defined in a separate array (color palette) and each pixel referenced an element in that separate array for its color. A common trick was you could swap out that separate array (pointer swap) for a different one on the fly and the colors would immediately change. On the CPU, this is relatively cheap. But on a GPU that is has its own VRAM copy and doesn’t want you messing with its memory and has dedicated bits for each R,G,B,A per-pixel, this trick doesn’t really work and trying to emulate it is really slow compared to what the hardware is designed to do natively.
[import]uid: 7563 topic_id: 31824 reply_id: 127048[/import]
hey ewing, thanks a lot for your answer. i am fetching the pictures from the internet, is there any way i can detect if its a 8bit png?
for example famous jetpack joyride is using a 8bit png 57*57 icon
[import]uid: 90610 topic_id: 31824 reply_id: 127071[/import]
I’m pretty sure this is an iOS problem. I wrote a game w/ Torque 2D and a different game with Corona SDK and in both cases I goofed (head slap) and had an 8-bit PNG (an icon in both cases). In both cases the image did not display properly on iOS devices. This leads be to believe that for some reason iOS or iOS devices do not like 8-bit images. Truly frustrating was the fact that I had no problem on Android devices and didn’t catch the issue till after my game was released.
Note: If anyone has a technical/exact answer I’m looking forward to hearing too.
Cheers,
Ed [import]uid: 110228 topic_id: 31824 reply_id: 127010[/import]
Probably you’re right. i just don’t get that i can fetch app icons that cant be displayed on the device
[import]uid: 90610 topic_id: 31824 reply_id: 127027[/import]
We recently (within the last month or 2) added better image support on iOS and Mac which included 8-bit png. However, PNG is a really complicated format and has dozens upon dozens of variations. We use Apple’s decoder on Mac/iOS. If Apple has a problem, then we inherit that problem. We do know some 8-bit PNGS images work.
But we don’t encourage the use of 8-bit PNGs. (We don’t really say we support them, but we improved the support because we knew some people were scraping web feeds where they can’t control the image format/)
Generally 8-bit PNGs (I’m really talking about the indexed image support using color palettes) are a bad idea on modern hardware. This is why iOS doesn’t like them. Most video hardware over the past 10-15 years is now specifically optimized to handle R,G,B,A components separately. Each component is given a specific number of bits in the hardware to represent a color value. The old school color palette technique was designed before these days were graphics were done mostly on generic CPUs, not GPUs. The trick was that colors were defined in a separate array (color palette) and each pixel referenced an element in that separate array for its color. A common trick was you could swap out that separate array (pointer swap) for a different one on the fly and the colors would immediately change. On the CPU, this is relatively cheap. But on a GPU that is has its own VRAM copy and doesn’t want you messing with its memory and has dedicated bits for each R,G,B,A per-pixel, this trick doesn’t really work and trying to emulate it is really slow compared to what the hardware is designed to do natively.
[import]uid: 7563 topic_id: 31824 reply_id: 127048[/import]
hey ewing, thanks a lot for your answer. i am fetching the pictures from the internet, is there any way i can detect if its a 8bit png?
for example famous jetpack joyride is using a 8bit png 57*57 icon
[import]uid: 90610 topic_id: 31824 reply_id: 127071[/import]