- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hello,
Is there an inverse to the AlphaPremul method?
Based on the thread here, it seems that AlphaComp always produces pre-multiplied results. If I want to save those results to PNG, I have to un-premultiply them. I dont see an inverse to the AlphaPremul method. Is there some other way of un-premultiplying an image, or so I have to write it by hand?
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hi David,
I am afraid we do not have, you probably could consider implemented by self. If you use AlphaPremul that means you already get Cr|g|b= Ar|g|b * αA , (αA=αC) and you would like to get RGB value of A, you could calculate by Cr|g|b*1/αC
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Hello,
Maybe you can consider this an addition for the future. Since you already have optimized code for doing the premul, it should be really easy do 1/alpha at the same time. Of course I can do it myself, but it likely will not be as optimized as the code you have for premul.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Have you tried ippsDiv?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
We did not try that. Do you think that one of the div functions will help in this case?
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
Yesterday I checked that ippiMul and ippiAlphaPremul are equivalent and remembered this thread, so ippiDiv should work with the caveat that it won't support the alpha packed with the RGB. You would need separate planes.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
ippiDiv has the problem of division by zero (returning an warning error code for u and s integer types and producing NAN_32F, INF_32F or INF_NEG_32F values for floating-point types). So, I do feel that AlphaUnPremul functions are missing. For example, Apple's vImage library has vImageUnpremultiplyData functions for the purpose.
Regards,
Adriaan van Os

- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla