Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
all groups > dotnet drawing api > july 2007

How to clear the content of a PictureBox which has a BG colour set to white? (.NET 2.0)
Posted by nvx at 7/31/2007 5:42:35 AM
Hello, how can I permanently clear the content of a PictureBox which has a background colour set to white? I have tried to do it the same way as I do the painting (create a Bitmap, clear it with white colour and draw it onto a Graphics on the PictureBox), but it does not work as I expect it wou...more >>


Raw RGB pixel data into a bitmap
Posted by Brian at 7/30/2007 11:30:02 AM
Hello there, I have a 2-dimensional byte array of RGB pixel data. The first dimension is the image width * 3, and the second is the image height. The format is as follows: R1G1B1R2G2B2..... etc. for each line in the image. I've been searching for an easy fast way to get the 2-dimensi...more >>

Addative / Subtractive Painting of a Region
Posted by ohs at 7/27/2007 2:00:05 AM
I'd like to allow users to paint over an image using a circle of a given size so that I can 'cut' out the painted area. I've tried using graphicspath.addellipse on mouse move which gives an impression of what I require but this leaves the interior of the path all jumbled with circles. I'...more >>

Metafile to BMP (or image type) need to retain quality
Posted by Gina_Marano at 7/25/2007 5:02:10 PM
Hey All, I have a metafile that I want to convert to an image format. The main purpose behind this is to rotate the image 180 degrees. However, the quality is quite pixilated. What is the best way to do this? basically I want to convert the metafile to an image format, rotate 180 then print...more >>

question about Powell's "Creating Transparent GIF Images"
Posted by active at 7/25/2007 9:23:56 AM
Why couldn't the palette of the saved bitmap be revised and re-inserted back into that bitmap. Rather then the time consuming coping of all that bitmap's data to a new bitmap? I'm sure knowing that is important to knowing how to work with indexed files. Thank ...more >>

Ncp = Bm.Palette clones Bm.Palette?
Posted by active at 7/24/2007 11:12:38 AM
Dim Ncp As ColorPalette = Bm.Palette From a test I ran I think that the above statement does not cause Ncp to reference Bm.Palette but instead produces a new palette and Ncp points to it. Is that true? If so, is the new palette a clone of Bm.Palette? Thanks ...more >>

Values in memorystream buffer confusing
Posted by active at 7/22/2007 3:35:40 PM
See code below mDifImage is 8-bit indexed How can I calculate what value to set sz to? I look at buffer expecting it to start with BITMAPFILEHEADER 14 bytes or BITMAPINFOHEADER 40 bytes but I see 13 bytes of mostly 2=digit values followed by many 3-digit values. What s...more >>

Bug in DrawString()
Posted by Maruszek at 7/21/2007 4:01:10 PM
I think I found a bug in Graphics.DrawString() method. Font underlines and strikeouts are drawn in wrong places after changing Graphics.PageUnit. To reproduce this bug place provided code in the Paint event of a form: { Font font = new Font("Arial", 10, FontStyle.Underline); Graphics g = ...more >>



Transparency Woes
Posted by ohs at 7/19/2007 10:22:02 PM
I need to animate graphics over a large.jpg set as the forms background. Reloading the image each time the animation moves is not an option as it takes too long. I thought drawing on a transparent panel would be the answer indeed it works with a non transparent panel but not with a transpa...more >>

Best way to dynamically adjust Bitmap Dimensions?
Posted by blaXoid NO[at]SPAM hotmail.com at 7/19/2007 8:35:09 PM
Hi there, I have a bitmap which I get graphics from and draw on. Sometimes the image will be too big for the bitmap bounds however, so I need to increase the dimensions. The constructor in Bitmap that takes an existing one and adjusts the size actually only scales it so this is of no use to m...more >>

GDI+ Editor
Posted by pamela fluente at 7/16/2007 12:17:09 PM
A am looking for a simple example of text editor made all by GDI+.. I can image one must be an expert to create a full editor: I just need the very basic. Typing and erasing letters, basic spacing and moving the cursor back and forth over a graphic object. Do you have an example or a pointer...more >>

Sparkling Lasoo Wand Tool !
Posted by ohs at 7/16/2007 10:10:04 AM
I'm looking for a way to 'Lasoo' a section of an image. Similar to the sparkling wand mask tools in Photoshop and the likes... Hopefully to return a region object. Any pointers ? Any ideas ? ...more >>

How would you change the size of a Format8bppIndexed bitmap?
Posted by active at 7/14/2007 8:07:19 PM
I need to change the size of an Format8bppIndexed image. I suppose I could change the format and scale it and put it back. But I'm wondering if there is a more straight forward way. How would you change the size of a Format8bppIndexed bitmap? Thanks ...more >>

Clip image based on emf metafile
Posted by Mark at 7/9/2007 2:18:50 PM
Hi, I'm trying to clip an image to an irregular shape. I've come across some advice from Bob Powell (http://groups.google.co.uk/group/microsoft.public.dotnet.framework.drawing/browse_thread/thread/86485270f7a57ede/dd79ef1988191326?lnk=st&q=cropping+or+extracting+ellipse+from+image&rnum=1&hl=...more >>

problem in showing icons of devices in explorer of my project
Posted by senadityasingh NO[at]SPAM gmail.com at 7/5/2007 11:06:45 PM
explanation of project: in my project there are many devices and when these devices are going to up ,they send their icons to explorer to show .if explorer does'nt able to show icons of these devices through proper way then it shows default icons of these devices. multithreaded...more >>

Left-justify text using DrawString
Posted by RobinS at 7/5/2007 9:33:16 PM
Is it possible to left-justify, center, or right-justify text on a panel when drawing it using DrawString? I looked at the StringAlignment class, but all it has is far, near, and center. Thanks, Robin S. ...more >>

Font Size Maximization for the area
Posted by RobinS at 7/5/2007 1:48:18 PM
I am creating Text Slides for my user, i.e. taking text input and creating jpegs out of it. I have text and the selected font. Is there a method for calculating the maximum font size I should use in order to fit the output to a specific area, like 1024x768? Or do I have to use MeasureStr...more >>

Green to Yellow to Red Gradient
Posted by TD at 7/5/2007 6:55:24 AM
New to use of Drawing Class.... I'm trying to create an asp.net page/control that will display a green to yellow to red gradient bar. Not seeing where I could create a 3 color gradient, I create a green to yellow rectangle and then a yellow to red rectangle and join them in one bitmap. ...more >>

How to mess up Powel's GIF transparent colour code
Posted by active at 7/4/2007 10:25:26 AM
In Powel's GIF transparent color article in the FAQ add one of the following at the top of Private Sub panel1_Paint Seems to me that putting the palette on the clipboard and then retrieving it should not change anything. Can you see what is wrong here? Thanks 1) Private S...more >>

Do you get a Palette when you input a .gif file?
Posted by active at 7/1/2007 10:16:29 PM
What do you get when you do: InputImage = Image.FromStream(... and the file is a .gif Is InputImage.Palette the palette of the gif file. I ask because I always find it to be Nothing But the InputImage displays OK as a Bitmap Thanks If that is not the .gif palette is that...more >>

How to pass a Graphics object to another method, modify it, and then get it back
Posted by nvx at 7/1/2007 6:16:22 AM
Hello there, could someone please tell me how should I pass a Graphics object (which has already been drawn onto) to another method to do some drawing and then get it back from the method with the changes made there? An example to clarify the situation: // this is done after calculating a ...more >>


DevelopmentNow Blog