DIB Graphics in Delphi

Posted on 2009-12-22
Last Modified: 2013-11-22
I need a simple DIB graphics routine in Delphi 2007 to manipulate the alpha value and rotation angle of a bitmap.  I have been using Peter Morris's ( DIB library, but this seems to conflict with some other software I am using (the CPort serial coms library).  CPort works fine in other contexts, and in the same program with the DIB disabled (further - the DIB software generates a massive number of non-obvious memory leaks, which makes me suspect that something funny is going on).

In a word, what I want is something very simple: a routine to place a bitmap on a Panel (or Canvas) and to be able to control the transparancy and angle of rotation, without any need to modify the original bitmap.
Question by:DanHamm
    LVL 16

    Accepted Solution

    Hi DanHamm,

    Maybe you find these helpful :
    RotateScanline  (Rotate Bitmap Any Angle Using Scanline Property)
    for the rotation part. Its free with sources.

    And Aggpas for the transparency part.
    Its the most complete source i've seen so far... And its free.
    You can do absolutely anything with it!

    You can download the source and compile the :
    alpha_gradient.dpr  or alpha_mask.dpr....alpha_mask2.dpr....alpha_mask3.dpr
    for the transparency part ... You will be amazed with this source.

    Combine the two codes together and you'll get what you need.

    I hope i helped you.
    LVL 16

    Assisted Solution

    I also found this which is exactly what you want :
    Antialiased Image Rotation unit v.1.22
    Fully functional
    Source: Included


    Author Comment

    This looks to be exactly what I want.  Thanks!

    Author Closing Comment

    Many thanks!

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    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…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    728 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

    22 Experts available now in Live!

    Get 1:1 Help Now