2

I had a problem recently with some devices after I upgraded to SDK Tools r16 from SDK Tools r11.

I found out it was texture related, now looking back the APK files I created with SDK Tools r11 contain exact copies of the textures in the raw file. But the APK files created with SDK Tools r16 contain some differences at the byte level, I can't see any difference, no difference in colour depth either, but whatever has happened to them causes problems loading on PowerVR GPU devices.

JPG and BMP files are not altered.

Does anyone know what might be causing this and how I can get a raw file to stay raw?

Edit: Looking at the files inside Notepad++ I see "iCCPPhotoshop ICC profile" is removed from the header. There may be other changes.

Edit2: Looking at the properties in windows explorer the raw one says "Attributes A" and the APK one says "Attibutes N". It's definitely stripping/changing information.

Edit3: I meant SDK Tools Revision XX not API XX

weston
  • 54,145
  • 21
  • 145
  • 203

1 Answers1

2

I don't know why anyone thought this was a good idea but Android does some sort of compression on PNGs. See here for one guy's experience with it. I'm not sure if API 16 does something different from API 11, but this behavior has been there since way before 11. As to how to fix this behavior, I suspect that renaming your resource might help. Try naming it whatever.mp3 instead of .png and see if that fixes it.

kabuko
  • 36,028
  • 10
  • 80
  • 93
  • 1
    Thanks very much for that, I followed your advice but renamed as bmp, that way I can still get a preview in windows. The file does not get altered during build and every thing works just fine on a PowerVR device again. Looked into it and the "feature" is called "png crush" btw. Ridiculous to change the files in raw folder I think. – weston Jan 19 '12 at 19:28
  • What I find weird is that PNG compression is not supposed to be lossy, so PNG Crush (http://pmt.sourceforge.net/pngcrush/) shouldn't reduce visual quality as per the blog article. I'm ok with PNGs being preprocessed if it doesn't make a visual difference although I agree it shouldn't happen in the raw folder. Anyway, glad to help. – kabuko Jan 19 '12 at 22:02
  • http://foundry376.com/wordpress/?p=79 dont available article can you put some guidelines? @kabuko – Ajay Pandya Feb 25 '16 at 04:10