Page 1 of 1

PNG with alpha channel

Posted: Wed Nov 30, 2005 11:08 am
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]

Re: PNG iwth alpha channel

Posted: Sun Dec 04, 2005 1:59 pm
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?

Posted: Fri Dec 30, 2005 7:08 am
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.

Posted: Wed Feb 01, 2006 11:19 am
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....