jit.alphablend - bug?

ATH's icon

as far as i understand the concept of jit.alphablend the attached patch with a jpeg as mask should work.

of course i could do it with jit.op, which works, but what is jit.alphablend good for then?

3503.WhatisAlphablendGoodfor.zip
zip
Christopher Dobrian's icon

Two things. 1) jit.alphablend expects 4-plane char matrices, and you're sending it a 1-plane matrix. (Use jit.pack or the @planemap attribute of jit.matrix to put your 1-plane masking image into plane 0 of a 4-plane matrix.) 2) The left inlet is the one that triggers output, so you need to be sending a matrix to the left inlet repeatedly at the desired frame rate, not just once.

ATH's icon

Thanks. A bit complicated. one would expect that a one plane matrix would be automatically used for all the 4 planes.
Maybe also more capacity using than with jit.op @op * ?

Anyway, thanx for your help and kind regards.