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 > january 2007

Drawing a Pixel?
Posted by Brian at 1/31/2007 7:31:07 PM
Hello. I'm using Visual Studio 2005 (VB) and I want to a draw a pixel to an (x, y) position on the form (is drawing to something else faster or easier?). Here's the catch; the pixel needs to have an RGB color value, so using System.Drawing.Brush is not an option, since you can only specify n...more >>

Loading image byte array
Posted by Andreas at 1/31/2007 3:33:52 PM
Hi, I recently found a thread where Frank Hileman suggested using the Bitmap overload that enables you to get direct access to the image byte-array, opposed to using unsafe code along with lockbits. I've written a small wrapper for this functionality and its working ok. My question is, how ...more >>

Invalid parameter used
Posted by JayvardhanPune at 1/30/2007 9:47:00 PM
I am using .Net 1.1 I am facing a problem with my GDI++ code in C# control. Though i have tried many things from last 6 months, i am not able to get completely rid of this bug. Whenever the user is opening a window or closing a window, i'm getting following exception. This is a very ra...more >>

Any hope for decent performance of System.Drawing
Posted by R=FCdiger_Klaehn at 1/28/2007 7:57:00 AM
Hi, I am writing a realtime scientific graphing library for use in a=20 Windows.Forms application. I am using all the usual tricks to get=20 decent performance, yet the performance is still less than optimal. It=20 is ok for graphs that update about once per second, but I would like=20 to the...more >>

ClearType is not used with Vertical text
Posted by ljlevend2 at 1/26/2007 3:25:01 PM
I've noticed that Drawing.Graphics.TextRenderingHint = ClearTypeGridFit does not seem to be used when StringFormat.FormatFlags = DirectionVertical. This is best seen by running the following example: Public Class Form1 Inherits Windows.Forms.Form Protected Overrides Sub OnSizeChang...more >>

answers? <1154504950.746457.270020@s13g2000cwa.googlegroups.com>
Posted by John Reynolds at 1/25/2007 5:57:25 PM
Did anybody come up with a definite answer for this? Any fixes? EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com...more >>

drawing a rectangle over an image
Posted by katie at 1/24/2007 9:55:58 PM
Hi, I'm trying to draw a rectangle around an image but for some reason for the life of me I can't figure out why the rectangle is not drawn the same width as the image any ideas? using(Image newImage = GenerateBitmap()) { Rectangle srcRect = new Rectangle(0,0, newImage.Width, newImage.Heigh...more >>

key to speed - use byte array instead of writing to locked image bytes
Posted by James Maeding at 1/24/2007 3:25:56 PM
I generally work with large scans, so speed matters for me. I wanted to set transparency for colors whose RGB byte total is less than 10 (light colors). I tried the Bob powell method listed at: http://www.bobpowell.net/lockingbits.htm which locks a source and dest bitmap, then writes to the de...more >>



Exception When using DashStype.Dot
Posted by Sanjay Kumar Singh at 1/22/2007 8:20:12 PM
Hi , I get an exception when using 'Pen.DashStyle = DashStyle.Dot' in my pen method. I have a pen as instance member of a class and set its dashstyle in the paint method. Can anyone please give some input on the same. Regards, Sanjay ...more >>

8 bit indexed bitmap object saves to jpg as 24 bit...
Posted by James Maeding at 1/22/2007 5:11:54 PM
I've been studying all the articles I can find on GDI+, and putting together a function to convert image colors and types. I am finding that I can quantize an image to 8 bit colors, and then save to png format perfectly with: bitmap.save(filename, ImageFormat.png) When I do the same thing to jp...more >>

Printing Tifs
Posted by njdude at 1/22/2007 4:42:43 PM
Im trying to print a tif file with size 975x839 with resolution 300x300. Im printing this onto a virtual printer which takes a size of 1720x2200 200x196 dpi. Im using the following code image.SelectActiveFrame( &pageGuid, i ); graphics.SetPageUnit( UnitInch ); graphics.SetInterpolationM...more >>

Antialias Matrix transformation?
Posted by Nik Coughlin at 1/22/2007 2:30:49 PM
Does anyone know a way around this? Do I need to write my own transform code? It appears that SmoothingMode doesn't apply to matrix transformations (in my case shear). The following code produces shearing with ugly stepping: viewPort.Graphics.SmoothingMode = SmoothingMode.AntiAlias; M...more >>

drawings
Posted by inventor guy at 1/21/2007 4:51:00 PM
How do I print (on the top) or on the right side of pages that are drawings? Drawings are in landscape style format. I need to set printing to the top of these drawings....more >>

Drawing the Office Button
Posted by ljlevend2 at 1/21/2007 4:29:00 PM
Are there any samples or documentation on how to draw the background for the Office Button (i.e., the button that replaces the File menu) in Office 2007? I really like the glossy look of this item in Office 2007 and I want to implement a similar looking item in my app. Thanks for any help!...more >>

Non-proportional (non Rectangular) resizing
Posted by GraGra33 at 1/21/2007 2:36:35 PM
Hi all... I have developed an application for managing a very large resource of artist's paintings and posts them to a web site. The application works well. I'm trying to reduce the complexity of having to work with photoshop and integrate one feature into the application > Distortion Trans...more >>

Image PorfFolio Library like ACDSee Desktop or Web?
Posted by zee at 1/19/2007 10:52:17 PM
Hello, I have to developed a image library like ACDSee in which i have thousands of images of different extensions including PSD and AI. Library will display the images in thumbnails and then user can click on a thumb nail to preview the orignal image I want to ask what will be the pros &...more >>

Only Gifs have indexed pixel formats?
Posted by Jim Light at 1/18/2007 10:47:29 PM
Hi, I know that Gif images have an indexed pixel format, However it is possible for Tiffs and jpegs to also have this format? Thank you for your time. Regards, Jim. ...more >>

Metafile surface size
Posted by erik.kallen NO[at]SPAM gmail.com at 1/18/2007 2:02:57 PM
Hi. I have the following code to draw an ellipse to a metafile: Metafile Metafile; using (Graphics gr = Graphics.FromHwnd(IntPtr.Zero)) { IntPtr hdc = gr.GetHdc(); Metafile = new Metafile(hdc, new Rectangle(0, 0, 300, 200), MetafileFrameUnit.Millimeter, EmfType.EmfPlusDual); gr.ReleaseHdc(h...more >>

Q: Why PictureBox takes SO MUCH memory ??
Posted by Kristijan Marin at 1/18/2007 12:39:03 PM
Hi, I have a problem with memory when trying to load more pictures ..... So what I do is , I load images into PictureBox and keep them there for further processing ..... so user can see, select, add etc .... For testing I'm loading 1.3MB tiff's ... Now the problem occurs when I try to ...more >>

Drawing real transparent background
Posted by ThunderMusic at 1/18/2007 10:20:09 AM
Hi, I'm currently designing a user control that will draw some graphics like rectangles and such... The control can select the drawn rectangle and move it. The thing is, a control is a rectangle and cannot be rotated, so if my drawn rectangle is rotated 45 degrees, the bounding rectangle (th...more >>

Treat byte array as bitmap?
Posted by Steve Marshall at 1/18/2007 3:37:08 AM
Hi all, I'm developing some lab software in VB.NET that talks to instruments. One of these can give me its screen image as a bitmap, but the interface software I use requires that I ask for this as a byte array. Is there some way to treat this byte array as a bitmap object? I'd like to displ...more >>

PictureBox ReSize occurs when assigning Image
Posted by Bill Burris at 1/17/2007 12:02:40 PM
private void pictureBox1_Resize(object sender, EventArgs e) { int w = pictureBox1.Width; int h = pictureBox1.Height; pictureBox1.BackgroundImage = new Bitmap(w, h); pictureBox1.Image = new Bitmap(w, h); Display(); } In this piece of code a Resize event is triggered agai...more >>

Flicker On Some Type Of Controls
Posted by Kürþat at 1/15/2007 11:06:16 AM
[C#, Windows Forms, .NET 2.0] Hi, I have a double buffered form with a TrackBar, some Labels, some Buttons, some NumericUpDowns and a ListView. When I call Refresh method of the Form, I see flicker on TrackBar and ListView. Why Flicker occurs on this two controls while Button, NumericUpDow...more >>

SVG Graphics
Posted by Dave at 1/12/2007 2:48:37 PM
SVG Graphics allow text to be drawn around curves etc (like work art) and send them to internet explorer and firefox .. etc. neat, but not 100% client side robust like .jpg and .gif Can you; - Do something similar in .net - or read and convert svg to bitmap in .net -- David Bray ht...more >>

Overlay transparent GIF
Posted by Andrew Brook at 1/11/2007 4:52:14 PM
Hi everyone, Any ideas how to overlay a GIF with transparent pixels onto another GIF using GDI+ ?:) thanks, Andrew ...more >>

How do I read a color in a picture box?
Posted by Sanchez at 1/10/2007 1:00:36 PM
How do I read a color in a picture box? My picture box di not contains an image. Thanks a lot!...more >>

Problem with Autoscroll
Posted by Jeff at 1/10/2007 9:24:40 AM
I have a window to which I'm rendering a lot of (images, text, rectangles, etc). The total height of everything rendered could end up being thousands of pixels, and I want the user to be able to scroll down to see them all. I'm using Bob Powell's Autoscroll tip inside my Container_Paint event: ...more >>

Bitamp form Graphics object
Posted by Sanchez at 1/9/2007 7:21:04 PM
Hello, is it possible to create a Bitmap from a graphics object?...more >>

How to draw a gradient pie like this?
Posted by Anderson at 1/9/2007 5:43:36 AM
Hi, I've read a lot about gradient, but still have no idea of drawing an image like this link below. http://hiphotos.baidu.com/futuremaster/pic/item/0d06424340ba36109313c6ec.jpg Any help is appreciated. Regards, Anderson ...more >>

drawing like office 2007???
Posted by giddy at 1/8/2007 10:42:28 AM
Hi , i would like to know how to implement the following (from office 2007) in my app from scratch(extending is fine , i dont wanna buy any 3rd party control) Equations: word 2007 has support for math equations -> http://gidsfiles.googlepages.com/word_equation.jpg http://gidsfiles.googlep...more >>

GradientFill API in VB.NET
Posted by NickP at 1/4/2007 3:01:56 PM
Hi there, I have also posted this in the vb group but not had any luck as of yet, I have been trying to get the GradientFill API working as no doubt it is faster than the .NET GDI+ equivilent (as with all the graphics API. I now have this.... (which doesn't work also)... Even...more >>

Save Image from PictureBox
Posted by prof_martin at 1/3/2007 7:56:00 PM
Hi, I got problem, kindly please help. Thank you error message: An unhandled exception of type 'System.NullReferenceException' occurred in Test.exe Additional information: Object reference not set to an instance of an object. with following code -------------------------------------------...more >>

position of a Bitmap
Posted by Lee Crabtree at 1/2/2007 2:44:42 PM
Is there a reasonably easy way to find the position of a Bitmap in a PictureBox? With the PictureBox's AutoSize property set to Zoom, it doesn't seem like there would be any way to figure it out, at least without knowing the zoom factor, and even then, there doesn't seem to be anything in e...more >>

Rounded rectangle and resize
Posted by Lorenzo.gr at 1/1/2007 10:49:00 PM
I have a simple question, I found this code in order to make thumbnail from an image. Then I added the function FillRoundedRectangle in order to make rounded corner found in following thread. The problem is that rounded function is ignored, if I delete the next line of code (g.DrawImage......more >>

General question about drawing objects in Winforms
Posted by B. Chernick at 1/1/2007 2:14:00 PM
Assume you are running Visual Basic 2005 Express. You want to write a Winforms program in which you draw a few simple vector graphic objects (such rectangles and circles) and then manipulate them with the mouse. By 'manipulate' I mean move them about the screen and change their dimensions ...more >>


DevelopmentNow Blog