Fade Image Region with GDI+ ?

Discussion in 'ASP .Net' started by localhost, Dec 23, 2003.

  1. localhost

    localhost Guest

    I want to read an image from disk, get the total width,
    and then find the bottom region (say an area of 120 high
    x the total width) and fade-away each pixel by a
    percentage to white, and then output that memory-modified
    image to the HTTP stream.

    Where should I look for info or samples on doing that?

    Thanks.
     
    localhost, Dec 23, 2003
    #1
    1. Advertising

  2. I doubt you're going to find a sample. However, I think I can give you a
    basic idea of what you need to do, and let you run with it from there.
    Baiscally, it sounds like what you want to do is to draw a gradient
    rectangle over a portion of your image. The gradient rectangle would be
    fully-transparent at one end, and fully-white on the other. This would give
    you the effect you described. For detailed information about how to use the
    System.Drawing Namespace to do this, check out the System.Drawing Namespace
    in the .Net SDK.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "localhost" <> wrote in message
    news:005601c3c973$76a5df70$...
    > I want to read an image from disk, get the total width,
    > and then find the bottom region (say an area of 120 high
    > x the total width) and fade-away each pixel by a
    > percentage to white, and then output that memory-modified
    > image to the HTTP stream.
    >
    > Where should I look for info or samples on doing that?
    >
    > Thanks.
     
    Kevin Spencer, Dec 23, 2003
    #2
    1. Advertising

  3. Hi localhost,

    Thank you for using Microsoft Newsgroup Service. Based on your description,
    you want some instructions or samples on how to operate on a Image grapchic
    object in .NET and also you want to output the graphic as a stream to the
    http web response.

    I think the GDI+ APIS in dotnet provides plentiful functions on Graphic
    operations, such as read/write image. And all images can be dealt with as a
    Graphic object, you can edit the graphic object's attirbutes in may ways
    such as by pixel or by a region area ...
    For the detailed instruction and sample, you may visit the tutorial on
    DOTNET QuickStart -> Graphic topic, here is the weblink to it:
    http://samples.gotdotnet.com/quickstart/winforms/doc/WinFormsGDIPlus.aspx#Al
    pha Blending

    As for output a graphic to the http stream, it is as easy as to output a
    graphic to a normal IOStream, an here is a good example shows "How to
    Optimizing Color Quantization for ASP.NET Images", I believe it'll be
    helpful.

    http://msdn.microsoft.com/library/en-us/dnaspp/html/colorquant.asp?frame=tru
    e

    Please have a look at the preceding web tutorials and let know if you need
    any help.

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Dec 24, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin van de Water [synthesiSFactory]

    GDI+ is not properly initialized (internal GDI+ error).

    Robin van de Water [synthesiSFactory], Jan 10, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    1,352
    Robin van de Water [synthesiSFactory]
    Jan 10, 2007
  2. SAL

    #Region #End Region issue

    SAL, Aug 29, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    360
    Alexey Smirnov
    Aug 29, 2008
  3. hon123456
    Replies:
    1
    Views:
    432
    Thomas 'PointedEars' Lahn
    Apr 12, 2006
  4. Jake Barnes
    Replies:
    6
    Views:
    207
    Evertjan.
    Sep 3, 2006
  5. Piotr Kaleta
    Replies:
    4
    Views:
    226
    Henry
    Apr 21, 2008
Loading...

Share This Page