473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

creating dynamic transparent image

Hey

ASP.NET 2.0

I'm wondering if it's possible to create dynamic transparent images in
asp.net 2.0?

This is some code (see below) from my web project. In this code below I
create a Graphics object and fill it with a background color. But I want to
change this so this Graphics object gets transparent...

Bitmap bitmap = new Bitmap(120, 30);
Graphics graphics = Graphics.FromIm age(bitmap);
graphics.Smooth ingMode = SmoothingMode.A ntiAlias;
graphics.Clear( Color.FromArgb( 255, 247, 246, 243));

Any ideas on how to create a transparent Graphics object (the background is
transparent) is very welcome!

Jeff
Nov 6 '06 #1
1 1898
I guess the best advice you can get from this newsgroup is to re-post your
question to
microsoft.publi c.dotnet.framew ork.drawing
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Jeff" <it************ @hotmail.com.NO SPAMwrote in message
news:eT******** ******@TK2MSFTN GP04.phx.gbl...
Hey

ASP.NET 2.0

I'm wondering if it's possible to create dynamic transparent images in
asp.net 2.0?

This is some code (see below) from my web project. In this code below I
create a Graphics object and fill it with a background color. But I want
to change this so this Graphics object gets transparent...

Bitmap bitmap = new Bitmap(120, 30);
Graphics graphics = Graphics.FromIm age(bitmap);
graphics.Smooth ingMode = SmoothingMode.A ntiAlias;
graphics.Clear( Color.FromArgb( 255, 247, 246, 243));

Any ideas on how to create a transparent Graphics object (the background
is transparent) is very welcome!

Jeff

Nov 6 '06 #2

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

Similar topics

7
3718
by: Craig Storey | last post by:
I have a little php application to store day hiking trips and to keep a running total of their yearly trips for a few users. Currently they select their hiking routes using drop lists or checkboxes containing the names and numbers of the trails. If the route is simple the form takes 1-2 minutes to fill in, if it involves lots of tiny sections it can become tedious to search for every trailname and may take 20 minutes. Because of this...
2
13751
by: Fearless Freep | last post by:
I know there's a PIL mailing list but I thought I would try the question here as well. I'm using PIL on Python 1.5.2 (stop laughing, it's what the ISP has for CGI and I don't have a choice) Anyway. I have a basic image and I need to overlay an image on top of it and let some of the basic image show through. Just as an aside the images are not of the same size and the top image needs to be pasted
7
20944
by: jhomp ssens | last post by:
I would like to create a pulldown menu which is semi-transparent....that is, you can see the text and graphics behind it when it is pulled down. The effect I'm looking for can be seen at http://www.countrywide.com. Are there any good tutorials which can show me how to do this with CSS?
1
1875
by: Chris Tremblay | last post by:
I am trying to create an image using GDI+ in VB.NET. I want to have the background be transparent, but when I do run the following: myGraphicsObject.clear(color.transparent) the resulting background color is black, not transparent. I am saving the image to the output stream as an "image/gif". Is there anything I should know about this, any reason that the result would be black? --
3
7618
by: kaczmar2 | last post by:
Hey there, I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover 100% of the image, and all I would need is a set of horizontal and vertical lines over the image to create a grid overlay. Two requirements would be to:
4
10238
by: Dale | last post by:
I am creating GIF images with transparent backgrounds on-the-fly for a web app and rendering them by using System.Drawing.Image.Save(Response.OutputStream, ImageType.GIF). I am confident that the transparency is working properly because if I save the created image to the local hard disk and then view it in a web page or an image editor, the transparency is correct. I can also view the transparency on-the-fly in a Windows.Forms...
9
5855
by: Chuck Anderson | last post by:
Is it possible to overlay a transparent watermark on an image - dynamically? I'd like the result to look like this example: <http://www.cycletourist.com/temp/photo.php> That is a bit of overkill, but you can see what I mean. The watermark image (a png image) is included separately below the photo. I tried using a class from phpclasses.org <http://www.phpclasses.org/browse/package/1580.html...
1
3387
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. The problem is when it creates transparent PNG format image then and it pixel ate the image. e.g. If i am using a gradient in background then it vary in color range. Now when i used that php script it generates image successfully but it pixel ate...
2
3475
by: neovantage | last post by:
Hey all, I have created transparent PNG images from text dynamically. But it edges are pixel-ate or we can say edges are distorted. Here is my LINK which shows my generated transparent PNG image. Can someone help me out to sort out my problem i will be very grateful to him as i am stuck bad with this issue and i am not figuring out how to fix this. Here is my Code which generate transparent PNG images <img...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.