How to draw a tranparent png image at Canvas?

Posted on 2006-05-18
Last Modified: 2008-03-06

I need to draw a PNG image on Canvas. Now I'm saving the image as a BMP and tranparent drawing works. But some PNG images have parts (like shadows on image) that merges with background. in PhotoImpact, I fill the backgroung with some color and the shadow become a real shadow, meging with background color. but on BMPs this don't happen. The mask color become transparent, but shadow part don't.

I need draw the PNG image on Canvas respecting the PNG instructions of transparency, like shadows need to work.

One example of an PNG of my example can be downloaded at:

Question by:alijunior
    LVL 28

    Accepted Solution

    you will need a png component that supports transparency. I never tried transparent png's but here are is a free library that is pretty good (dunno about transparency, though they mention some support of it):
    LVL 2

    Author Comment


    That was exactly what I need. I search but not found it before...

    Thanks a lot!

    Best regards.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now