Hi Marcelo,
The imImageCopyAttributes function does not depend on the alpha flag. So
switching with imImageAddAlpha would not produce the expected result.
imImageCopyAttributes will blindly copy all attributes.
Actually the alpha layer (we cal it plane) information is stored together
with the color planes data, not in the metadata information. And it is not
being copied because imImageCreateBased does not copy any data.
So if you need to copy just the alpha plane then after
calling imImageCreateBased, call the imImageCopyPlane function with
src_plane=dst_plane=alpha_plane. For instance:
if (src_image->has_alpha)
{
int alpha_plane = src_image->depth;
imImageCopyPlane(src_image, alpha_plane, dst_image, alpha_plane);
}
Best Regards,
Antonio Scuri
2014-07-10 15:33 GMT-03:00 Marcelo Ghelman <[email protected]>:
> Hi Scuri,
>
> The *imImageCreateBased* function has a bug.
> If the source image has transparency, the function don't copy the alpha
> layer.
> To fix it, just swap lines, calling *imImageAddAlpha* before
> *imImageCopyAttributes*.
>
> Best regards,
> Ghelman
> --
> *Marcelo Ghelman*
> Pesquisador
>
> Centro de Pesquisas de Energia Elétrica
> Departamento de Automação de Sistemas
> 55 21 2598-6242 | fax 55 21 2260-6211
> [email protected]
>
> [image: Eletrobras Cepel] <http://cepel.br>
>
>
> Antes de imprimir, pense no meio ambiente
> CEPEL - Comitê de Sustentabilidade
>
>
> AVISO
> Esta mensagem é destinada exclusivamente à(s) pessoa(s) indicada(s)como
> destinatário(s),
> podendo conter informações confidenciais, protegidas por lei. A
> transmissão incorreta da
> mensagem não acarreta a perda de sua confidencialidade. Caso esta mensagem
> tenha sido
> recebida por engano, solicitamos que seja devolvida ao remetente e apagada
> imediatamente
> de seu sistema. É vedado a qualquer pessoa que não seja destinatário,
> usar, revelar, distribuir
> ou copiar ainda que parcialmente esta mensagem.
>
> DISCLAIMER
> This message is destined exclusively to the intended receiver.
> It may contain confidential or legally protected information.
> The incorrect transmission of this message does not mean loss of its
> confidentiality.
> If this message is received by mistake, please send it back to the sender
> and delete it from
> your system immediately.
> It is forbidden to any person who is not the intended receiver to use,
> reveal, distribute, or
> copy any part of this message.
>
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users