#1 2011-07-23 07:36:23

fkaynakli
Member
Registered: 2011-06-14
Posts: 12

Transparent PNG demo

Hi;
I worked on adding transparent PNG to PDF for couple of days and I found that php library fpdf can do this. So I translated the php code to Delphi. You can download first demo application from here. I just worked on 32bits PNG images. The code uses a grayscale image for defining pixel transparency. But I have two problems:

  • I can't extract Alpha channel from PNG directly. First load PNG image than I need to reload for extracting alpha. So it is not very effective.

  • If I use a grayscale BMP as a mask image, it is ok. But if I use a grayscale PNG as a mask image, the are some problematic pixels. I think grayscale PNG loading function has a problem..

If someone can help I will be very pleased...

Last edited by fkaynakli (2011-09-03 10:01:56)

Offline

#2 2011-07-24 06:40:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: Transparent PNG demo

I'll take a look and check your code.

Thanks for your feedback!

Offline

Board footer

Powered by FluxBB