been looking for a long time for a good asp component that handles png & transparency..
that one seems to do so but i can't get it to work properly, don't know if i'm doing something wrong it should be quite simple from what i've seen..
what would be the proper code to load a png file and save it back keeping its transparency ?
for my test i simply use the example4.asp test and modify a couple of things..
Code: Select all
const AX_PNG = 3
With ctrl
.UseTransparency = True
.LoadBitmap Path & "\test.png"
.SaveFormat = AX_PNG 'Save in PNG format
.SavePNGCompression = 7
.SaveBitmap Path & "\output.png"
end with
set ctrl=nothing
sometimes i get some black background like with the file above or white wackgrounf with my png files.. i don't use any gradients in my pngs so i guess it's why it gets all white, not like the file above..
thx for your help
.webdev
PS:
1.your examples use AX_JPEG=3 which is not correct according to your help documentation, AX_JPEG should be 1 not 3 (=AX_PNG)
2.I'm using firefox for my tests as i know msie has serious problems with png transparency.. i've also checked the output files with photoshop..[/code]