Delphi & Greyscaling Alpha Blended PNG's

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

mkeeley
Posts: 9
Joined: Sun Jan 29, 2006 7:09 pm

Delphi & Greyscaling Alpha Blended PNG's

Post by mkeeley »

Hello again,

I'm stuck with another problem. I'm trying to greyscale and then lighten using Gamma correction an alpha-blended PNG image. I then want to save it out as a greyscaled alpha-blended png.

I've tried using the LoadParam ColorModel := GFL_GREY, but the output is still coloured but lighter because of the Gammea correction.

I also tried loading it normally and grey scaling, setting it back to RGB. But the gey scaling kills the alpha channel and the output has a solid black background.

Anyone have any ideas?

Also is this group still being monitored by Pierre as there doesn't seem any replies since the end of Nov. Would I be better off e-mailing Pierre directly?

Thanks

Marc Keeley
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Delphi & Greyscaling Alpha Blended PNG's

Post by xnview »

mkeeley wrote:Hello again,

I'm stuck with another problem. I'm trying to greyscale and then lighten using Gamma correction an alpha-blended PNG image. I then want to save it out as a greyscaled alpha-blended png.

I've tried using the LoadParam ColorModel := GFL_GREY, but the output is still coloured but lighter because of the Gammea correction.
ColorModel is used for RAW loading
I also tried loading it normally and grey scaling, setting it back to RGB. But the gey scaling kills the alpha channel and the output has a solid black background.
Anyone have any ideas?
Yes, converting in greyscale delete alpha channel.
Your original file is in 32bits?
Also is this group still being monitored by Pierre as there doesn't seem any replies since the end of Nov. Would I be better off e-mailing Pierre directly?
Sorry i was very busy with next release of xnview...
Pierre.
mkeeley
Posts: 9
Joined: Sun Jan 29, 2006 7:09 pm

Post by mkeeley »

Hello Pierre


Yes the alpha-blended PNG is 32 bit, just want to grey scale it and lighten it with some Gamma correction whilst still keeping the alpha-blending.

Marc
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

mkeeley wrote:Hello Pierre


Yes the alpha-blended PNG is 32 bit, just want to grey scale it and lighten it with some Gamma correction whilst still keeping the alpha-blending.
So you must make your own greyscale function to keep alpha... Sorry
Pierre.
Guest

Post by Guest »

OK, thanks I'll have to do some investigation.

Marc