PNG with alpha channel

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

Moderators: XnTriq, helmut, xnview

Ale

PNG with alpha channel

Post by Ale »

I´m trying to resize a PNG file to a other PNG file more small with alpha channel, but the result image have a black background. I use GflAx and this is the code

Code: Select all

Set ctrl = server.createobject("GflAx.GflAx")
File = pathgo & "\" & nombreOriginal
const AX_JPEG = 1
const AX_PNG = 3
With ctrl
	.UseTransparency = True
	.LoadBitmap File
	.resize 15, 10
	.Saveformat = AX_PNG
	.SavePNGCompression = 7
	.SaveBitmap pathgo & "\" & nombre
end with
set ctrl=nothing	
[/code]
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: PNG iwth alpha channel

Post by xnview »

Ale wrote:I´m trying to resize a PNG file to a other PNG file more small with alpha channel, but the result image have a black background. I use GflAx and this is the code

Code: Select all

Set ctrl = server.createobject("GflAx.GflAx")
File = pathgo & "" & nombreOriginal
const AX_JPEG = 1
const AX_PNG = 3
With ctrl
	.UseTransparency = True
	.LoadBitmap File
	.resize 15, 10
	.Saveformat = AX_PNG
	.SavePNGCompression = 7
	.SaveBitmap pathgo & "" & nombre
end with
set ctrl=nothing	
[/code]
.UseTransparency is only used for GetPicture
Could you send me or post the picture used?
Pierre.
Ale

Post by Ale »

The picture is very easy, open Photoshop, create a layer with a color and set propertie transparency to 50% an save as png-24. Then try to resize and save this image with GflAx, the image result it is different than the original.
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Ale wrote:The picture is very easy, open Photoshop, create a layer with a color and set propertie transparency to 50% an save as png-24. Then try to resize and save this image with GflAx, the image result it is different than the original.
I have not photoshop, so please thanks to send a sample....
Pierre.