Log in

View Full Version : Avisynth not supporting 8-bit alpha?


pancserzso
20th July 2011, 17:52
I am trying to merge two layers of RGBA sources. My script is as follows:

clip2 = ImageSource("x_alpha0458.png", pixel_type = "RGB32")
clip1 = ImageSource("x_alpha0470.png", pixel_type = "RGB32")
mix = Layer(clip1, clip2, "add")
return mix

My problem is, that Layer operation doesn't seem to support 8-bit alpha channel, only some kind of 1 bit alpha. Is it normal to occur? My images have a nice blending in Photoshop, but in Avisynth this is all I get (notice the strong, rought edges and the lack of proper blending)

http://i.imgur.com/ZjUVU.png (http://imgur.com/ZjUVU)

Gavino
20th July 2011, 18:10
Avisynth certainly supports 8-bit alpha.
Please post your original images somewhere so we can try out your script.

pancserzso
20th July 2011, 18:12
Avisynth certainly supports 8-bit alpha.
Please post your original images somewhere so we can try out your script.

http://ifile.it/6ajg8dp

Possibly is it a question of premultiplied alpha? I never understood what is the difference between different alpha formats.

Chikuzen
20th July 2011, 19:26
V1=ImageSource("a.png",pixel_type="RGB32")
V2=ImageSource("b.png",pixel_type="RGB32")
Base=BlankClip(V1)
Layer(Base, V1)
Layer(last, V2)
http://i54.tinypic.com/2rx7ibm.png

pancserzso
3rd August 2011, 19:56
V1=ImageSource("a.png",pixel_type="RGB32")
V2=ImageSource("b.png",pixel_type="RGB32")
Base=BlankClip(V1)
Layer(Base, V1)
Layer(last, V2)
http://i54.tinypic.com/2rx7ibm.png

Thanks, it works perfectly! (I couldn't test it before)