473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Fade Image Region with GDI+ ?

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.
Nov 18 '05 #1
2 1781
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" <pr*******@cohort.ces> wrote in message
news:00****************************@phx.gbl...
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.

Nov 18 '05 #2
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.)

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Acer | last post by:
Hi, Can somebody help me to create a php function which show an image, fade-out to another images ? thx
2
by: Susanna | last post by:
Hi all, I'm using the following slideshow script that I found on the web to display changing images with a crossfade effect. Eventually I will be adding many more images to the slideshow. The...
1
by: Robert Skidmore | last post by:
I am building an application that will fade one panel to another panel. Both panels will have picture boxes in them (thumbnails). This is what I have tried: private void...
4
by: Brian Basquille | last post by:
Hello all, Quick question! How would i keep a point inside a region? For example, the mouse pointer. You should be able to move the mouse around in this region but not anywhere outside it. ...
1
by: BillZondlo | last post by:
Can someone look at this and tell me why, when I call this from my main app, it displays fine (fades form in and out) but then before my main app displays, I see other dialog boxes flash...
12
by: clintonG | last post by:
VS2005 2.0 Beta 2 noting I've posted (to no avail so far) to the somewhat deadzone at news://microsoft.public.vsnet.ide and am getting ants in my pants for some discussion about this issue. ...
2
by: Emil | last post by:
Hi, if you open the link below and click on "Show Me" and then "Toggle Transition" Button you will see a wonderfull fade in / fade out transition of 2 pictures. ...
2
by: Mark Denardo | last post by:
Hi, I need some expert GDI+ person to help me with my RoundOffImage Function: What I'm trying to do is take in an image, crop off the edges around an ellipse region I set up, and then return the...
4
by: pt36 | last post by:
Hi I have a small script function photo(a){ var photo = a ; document.getElementById(photoID).innerHTML = photo; } and on the body
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.