What is wrong with PNG with Alpha mask ? Everything it seems

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

What is wrong with PNG with Alpha mask ? Everything it seems

Post by gilesgoat »

So "here we are again" .. any time I get "something different" ..

So suppose someone ( probably made on MAC not sure ) gives you "a high res PNG of a logo" with a transparent alpha mask.

So like "BANANA" on a transparent background.

You say "where's the problem to import it into anything" .. well suppose you'd like to save that PNG maybe "in some other format" with an alpha channel ..

"Sure how hard can it be ?" ..

FUCKLOAD .. it seems .. "i've seen ALL sort of crap" coming out from programs trying to convert a PNG with a transparent layer into something else, let's say "the simplest as possible" an RGBA32 .tga or such .. you think where is the problem, you have 24 bits for RGB and 32 bits for Alpha .. "a snap" ..

NO ...

To make it short "every damned program I used" seems to have "a different idea" about what "alpha" should be ...

It's a mess .. a terrible mess ...
Giles the billy goat
"Baa"
User avatar
Oaf
Baaaaa!
Baaaaa!
Posts: 1688
Joined: Mon Nov 11, 2002 1:14 pm 0
Location: Dark Hedges
Contact:

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by Oaf »

Paint.net
User avatar
Little stoned kiwi
Baaaaaa!
Baaaaaa!
Posts: 4597
Joined: Mon Oct 27, 2003 6:05 am 0
Location: Christchurch

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by Little stoned kiwi »

Gimp?

But then, why?
If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy.
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by gilesgoat »

Little stoned kiwi wrote:Gimp?

But then, why?
I have Gimp.

I don't know how someway someone managed to send me a "texture" that "looks so stupid" and must have something that as soon as I try to convert it into something else goes all crap .. I really don't know "how it's possible to fuck up such a simple thing" ??
Giles the billy goat
"Baa"
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by gilesgoat »

So in the end I actually used GIMP, I re-opened that file, scaled it down just a little and re-exported as DDS.

This time it did work ...

Do I know what the heck had it before ? NO and I will NEVER know !
Giles the billy goat
"Baa"
User avatar
gilesgoat
Sheepie Whore
Sheepie Whore
Posts: 27258
Joined: Wed Sep 03, 2003 7:54 am 0
Location: Monfalcone, Italy
Contact:

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by gilesgoat »

"More shit with PS4" this time ..

Apparently "certain programs" may embed some "metadata" in the .PNG that NOT everyone likes ...

"Put this image 1024x1024 24Bpp here" .. SOUNDS .. trivial .. NO IT ISN'T !

<Process>...
"Error : Image is not in a valid format !"
</Process>

NNNNNGGGH !

One day I have to read the PNG specs, for curiosity, I know that PNG supposedly "it's better for hand drawn/comic/sharp edges images" so I am not sure what type of compression, other than DCT/etc. uses but I suppose "something else".

Or was it just invented to circumvent some patent issues ?
Giles the billy goat
"Baa"
User avatar
Vargol
Baa!
Baa!
Posts: 59
Joined: Wed Jun 05, 2019 7:54 pm 0

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by Vargol »

From what I remember PNG takes the first value in a row then generates deltas for the rest then does uses one of the patent free standard compression algorithms.
on the row. Throw in a CRC32 value of the compressed data I think and a header. Not sure how it splits up the RGBA though.

It can do columns and diagonals etc to derive the deltas too, but each chunk is row

I've written a noddy Java (and .net I think?) class that used a subset of the deltas method, but thats was greyscale so I didn't have to split the RGB
Looked up the code, mostly right, the compression is zlib.
User avatar
rowan
Baaaaaaa!
Baaaaaaa!
Posts: 7963
Joined: Tue Nov 25, 2003 11:53 pm 0
Location: Notts.

Re: What is wrong with PNG with Alpha mask ? Everything it s

Post by rowan »

I use pngout to optimise [compress] png files.
It also strips unnecessary chunks by default, at a guess that may sort out what PS4 doesn't like.

Tutorial
http://advsys.net/ken/util/pngout.htm

Executable
http://advsys.net/ken/utils.htm#pngout
Post Reply