Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Fade Image Region with GDI+ ?

Reply
Thread Tools

Fade Image Region with GDI+ ?

 
 
localhost
Guest
Posts: n/a
 
      12-23-2003
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.
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      12-23-2003
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" <(E-Mail Removed)> wrote in message
news:005601c3c973$76a5df70$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      12-24-2003
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/quickst...DIPlus.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....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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mootools Ajax fade in fade out response problem Piotr Kaleta Javascript 4 04-21-2008 03:35 PM
help! I can not get fade-in or fade-out of opacity in IE Jake Barnes Javascript 6 09-03-2006 07:54 AM
How to made fade in / fade out jpg in table cell hon123456 Javascript 1 04-12-2006 12:53 PM
Image WebControl and fade tommy_razz ASP .Net 3 03-11-2005 05:55 PM
Gradual image fade in newtohtml@att.net HTML 27 07-20-2004 12:19 AM



Advertisments