XPSer

Hi,all

I have to deal with xps files created by xps document writer form pdf file.

There are some words not glyph data but PNG format images in these xps files.

I am not familiar with GDI+.

Do anyone can tell me why I can not convert a true color PNG format image with alpha channel to a JPEG

format image correctly using image.save()

These PNG format images are all with alpha channel and the "ColorType" set to 0x06.

When I use a PNG format image with "ColorType" set to 0x02, it can correctly converted to a JPEG format image using GDI+.

So I think it is problem of alpha channel.

===========================================================================

problems:

How can I convert a PNG format image with alpha channel to any formats without alpha channel.



Re: XML Paper Specification (XPS) Problems about PNG

Feng Yuan - MSFT

If you know the background color, you can blend the image with the background and convert it to an image without alpha channel.

For printing, in most cases, you can assume background color to be white.






Re: XML Paper Specification (XPS) Problems about PNG

XPSer

Thanks a lot .

There are so many applications with complex background, so I can not assume background is white .

Anyway, thanks a lot for leading me to blending way.