Transparent PNG has become solid black

I seriouslly doubt pngcrush is causing this problem since at least for me, pngcrush runs on adHoc builds.

What is likely the cause is that the @2x version of the image might be the cause if it’s effecting those devices. Have you tried using a 24 bit png (well 32 bit in Corona terminology)? I try to avoid 8bit pngs where possible in my apps.

I got a black bar on what would be the menu page on both my iPhone 5 and iPad 3. [import]uid: 19626 topic_id: 33133 reply_id: 132078[/import]

If you need to experiment w/ different image depths, you might consider using ImageMagick to do the conversions. http://www.imagemagick.org/script/index.php
[import]uid: 110228 topic_id: 33133 reply_id: 132098[/import]

Just one thing I noticed recently…

I was loading transparency image and using setFillColor to tint it, instead of creating hundreds of differently coloured images. At one point I realised that the image suddenly looked black because I wasn’t using a transparency image, I was using the fully coloured image it was based on. Switching to the transparency fixed the problem. [import]uid: 8271 topic_id: 33133 reply_id: 132099[/import]

@mateosolares,

OK. I’ve now run your app (version 6.5) on two devices with these results.

Gen 3 iPod Touch - Works fine, looks good.
Gen 4 iPod Touch (retina display) - Runs, but has black box where sliding main menu should be.

Looks like those @2x textures may be the culprit.
Note: Earlier I mentioned 8-bit per channel PNGs. I hope I didn’t confuse things.
I was referring to 8-bits per channel == RGBA-8888 == 32-bits per pixel.
I’ve used PNGs with lower encodings such as RGBA-4444 and those tend to have problems on some iOS devices.
[import]uid: 110228 topic_id: 33133 reply_id: 132096[/import]

@mateosolares,

Three questions:

  1. What is the bit-depth of your image? i.e. is it 8-bits per channel? (I have on occasion converted my images to a lower bit encoding and this causes issues on some devices.)

  2. Do you have antialias set to true in config.lua? (Sometimes causes problems for me.)

  3. Have you tried displaying just the problem image in an otherwise empty app? (To rule out interactions with the rest of your game/app).

If you like, you could send me the image and I’ll take a look:

PS - I may have missed this, but is this a customer complaint. If so, do you have any idea what device, generation, and OS version this is failing on.

I also read the line where you said you can’t reproduce this. so suggestion/question #3 above probably won’t be useful.

I have an older device I could try to reproduce this on, what is the can you tell us the app or post a link to the store page? [import]uid: 110228 topic_id: 33133 reply_id: 132027[/import]

emaurina,

  1. 8 bits per channel, same as all other graphics in my app.
  2. antialias is true. I need this as I do quite a lot of scaling.
  3. No. I can’t even reproduce the error in any build. It’s only the version that I released to the app store that exhibits the black pixels. It works fine in simulator, on several devices, and with testflightapp distributor builds.

I suspect some data corruption, but where it occurs ( Corona project - > Corona SDK 2012.945 -> Xcode 4.5.1 -> Application Loader ) , is a mystery to me.

thanks
Mateo

[import]uid: 36578 topic_id: 33133 reply_id: 132028[/import]

PS

It’s many customer complaints. I’ve tried on iPad3, iPhone4, iPod5 with iOS5 and 6 - all broken.

https://itunes.apple.com/us/app/id428920239 [import]uid: 36578 topic_id: 33133 reply_id: 132029[/import]

It’s 8-bits per channel + alpha, RGBA-8888.

I’ve used the exact same graphic since last year, and submitted app updates several times with no problem.

The difference between the updates that had no problem and this latest update:

OLD: Corona SDK2012.894 + XCode 4.3.x
NEW: Corona SDK2012.945 + XCode 4.5.1

But, the latest versions works fine on testflightapp.com builds, and device builds.

I suspect some kind of corruption en route to Apple.

Thanks for all your help.
Mateo

[import]uid: 36578 topic_id: 33133 reply_id: 132131[/import]

I wonder if there is some way to specify ‘no PNG optimization’ during the build process?

http://imageoptim.com/xcode.html

COMPRESS_PNG_FILES = NO;
I wonder if there is a build.settings flag for this? [import]uid: 110228 topic_id: 33133 reply_id: 132035[/import]

Your app works fine on my gen 3 iPod Touch. BTW, nice looking app. [import]uid: 110228 topic_id: 33133 reply_id: 132041[/import]

Corona Enterprise might have this capability, but I think compression is fixed ON for distribution builds, and OFF for dev builds.

re: Fun English

Did you install version 6.5?

iPod touch 3rd gen is 480x320 like 3GS. Maybe the small PNGs are ok, but the @2x are not…

Thanks for testing, and for the compliment!

Mateo

[import]uid: 36578 topic_id: 33133 reply_id: 132043[/import]

Yes. I installed version 6.5.

I’ll test it on a gen 4 ipod touch and write back with results in the morning. i.e. I can answer the @2x question with that. [import]uid: 110228 topic_id: 33133 reply_id: 132047[/import]

I seriouslly doubt pngcrush is causing this problem since at least for me, pngcrush runs on adHoc builds.

What is likely the cause is that the @2x version of the image might be the cause if it’s effecting those devices. Have you tried using a 24 bit png (well 32 bit in Corona terminology)? I try to avoid 8bit pngs where possible in my apps.

I got a black bar on what would be the menu page on both my iPhone 5 and iPad 3. [import]uid: 19626 topic_id: 33133 reply_id: 132078[/import]

If you need to experiment w/ different image depths, you might consider using ImageMagick to do the conversions. http://www.imagemagick.org/script/index.php
[import]uid: 110228 topic_id: 33133 reply_id: 132098[/import]

Just one thing I noticed recently…

I was loading transparency image and using setFillColor to tint it, instead of creating hundreds of differently coloured images. At one point I realised that the image suddenly looked black because I wasn’t using a transparency image, I was using the fully coloured image it was based on. Switching to the transparency fixed the problem. [import]uid: 8271 topic_id: 33133 reply_id: 132099[/import]

@mateosolares,

OK. I’ve now run your app (version 6.5) on two devices with these results.

Gen 3 iPod Touch - Works fine, looks good.
Gen 4 iPod Touch (retina display) - Runs, but has black box where sliding main menu should be.

Looks like those @2x textures may be the culprit.
Note: Earlier I mentioned 8-bit per channel PNGs. I hope I didn’t confuse things.
I was referring to 8-bits per channel == RGBA-8888 == 32-bits per pixel.
I’ve used PNGs with lower encodings such as RGBA-4444 and those tend to have problems on some iOS devices.
[import]uid: 110228 topic_id: 33133 reply_id: 132096[/import]

It’s 8-bits per channel + alpha, RGBA-8888.

I’ve used the exact same graphic since last year, and submitted app updates several times with no problem.

The difference between the updates that had no problem and this latest update:

OLD: Corona SDK2012.894 + XCode 4.3.x
NEW: Corona SDK2012.945 + XCode 4.5.1

But, the latest versions works fine on testflightapp.com builds, and device builds.

I suspect some kind of corruption en route to Apple.

Thanks for all your help.
Mateo

[import]uid: 36578 topic_id: 33133 reply_id: 132131[/import]