Re: Grphics: How to draw an image transparent

From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 03/15/05


Date: Tue, 15 Mar 2005 12:22:56 +0100

At the bottom of the Drawing An Image article in the GDI+ FAQ it clearly
shows how to draw an image with transparency using the ColorMatrix
structure.

-- 
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"felix" <felix@news.com> wrote in message 
news:urABNOUKFHA.2704@tk2msftngp13.phx.gbl...
> Actually, I can't find such an information on your website. I know how to 
> draw an image and I'm also able to draw a transparent gif (well, I think, 
> GDI+ simply handles the transparency on its own).
>
> What I want is to render the entire image (regardless of its own 
> transparency or file-format / pixel-format) with a specific alpha. Imagine 
> a slider where the user can modify the alpha value in the range [0,255] 
> and the image will be rendered accordingly.
>
> I can't find any information about that issue. Thus, I'm really looking 
> forward for any help I can get.
>
> Regards,
> Felix
>
>
> Bob Powell [MVP] wrote:
>> The info you need is actually in the GDI+ FAQ. See the article on Drawing 
>> images.
>> 


Relevant Pages

  • Re: AntiAlias a Tiff Image with GDI+
    ... Antialiasing of images is controlled by the interpolation mode and really ... Any image that you draw same-size will be the same pixel quality. ... Answer those GDI+ questions with the GDI+ FAQ ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: simple drawing with a mouse
    ... I invite you to visit the GDI+ FAQ to discover why this is a horribly bad example. ... private bool Draw = false; ... private void Form1_MouseMove ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Freehand Drawing with Zoom
    ... See the article in the GDI+ FAQ on that subject. ... Because it uses the inverse of the matrix used to draw the zoomed page, the mouse position translates back to the image correctly. ... I don't know how to overlay the grid so ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Draw Rectangle directly to client (ie - without bitmap?)
    ... I'm assuming that your drawing to the screen and your stuff is disappearing between draw cycles. ... Perhaps you should draw your rectangles to an image in memory and then display that instead. ... Answer those GDI+ questions with the GDI+ FAQ ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: GIF Transparency
    ... for transparency. ... Answer those GDI+ questions with the GDI+ FAQ ... When I save any image as GIF, gdiplus always uses its halftone palette, ...
    (microsoft.public.dotnet.framework.drawing)

Loading