Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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

Additional buttons on ALL forms' title bar
Posted by jass.zhao NO[at]SPAM gmail.com at 5/31/2007 1:44:03 AM
Hi, all, I am pretty new to Windows GDI development. However, I got a question maybe interesting .... The case is=A3=BAI'm writing a system-level app, which I want it to be accessed very easily. The idea is to draw additional button on all Forms (not only my app, any forms), so that the u...more >>


GDI+ DrawImage has 0.5 pixel offset - visible for highly zoomed bitmaps (>4X)
Posted by Steve Mowbray at 5/28/2007 8:44:52 PM
Hi When drawing say an 8x8 bitmap to say a 128x128 bitmap using Graphics::DrawImage(image,x,y,width,height) there is a 0.5 pixel offset between the input and output - that is the first zoomed in pixel in every row and the entire first row is only half as wide as the other 7 rows and there...more >>

I believe there is something wrong with Matrix.RotateAt
Posted by active at 5/27/2007 9:29:52 PM
I believe there is something wrong with Matrix.RotateAt The following example shows the problem. Form needs a picture box and a context menu. PictureBox1 ContextMenuStrip1 ToolStripMenuItemPlus20 ToolStripMenuItemMinus20 ToolStripMenuItemNewImage When the image is rotated it ...more >>

use thread in OnPaint message
Posted by zade at 5/27/2007 6:23:06 PM
I want to use thread to improve the speed of the drawing. just like this: public override OnPaint(PaintEventArgs e) { new System.Threading.Thread(new ParamterizedThreadStart(this.PaintImpl)).Start(e.Graphics); } private void PaintImpl(Graphics graph) { //..... } but it always raise e...more >>

LockBits and IrfanView
Posted by Cat at 5/26/2007 1:18:27 AM
http://msdn2.microsoft.com/en-us/library/5ey6h79d.aspx This LockBits example code worked fine with many images, but not with images saved with IrfanView. When an image saved with IrfanView is used, the resulting image looks like a scanlined image. I examined the byte data and found the reason,...more >>

TiffBitmapEncoder bug?
Posted by Robert Simpson at 5/24/2007 3:58:08 PM
I've finally nailed down a problem with some TIFF's I've been generating in ..NET, and wanted to know where the blame may lay :) I have some pretty simple code which saves a TIFF in Ccitt3 format. However, when opening the resulting TIFF in something like Paint Shop Pro X (as well as some o...more >>

I need to zoom a bitmap with no interpolation
Posted by Jeff Johnson at 5/23/2007 11:20:02 PM
I'm making a small Paint-like program and when I zoom in I want to see each individual pixel as its own block of solid color. Everything I've tried with the Graphics methods has resulted in smoothed images, even if I use InterpolationMode.Low. Is there any way to get .NET to do this for me or ...more >>

REQ: Fast method for converting RGB to 1bpp
Posted by Berend at 5/22/2007 2:41:39 PM
Hi, I need to edit 20.000+ TIFFs. Currently I'm converting my TIFF images back to CCITT4 (after watermarking them) using Bob Powell's method which can be found at http://www.bobpowell.net/onebit.htm. However, converting a single TIFF takes about 10 seconds or so. Is there a faster way? Eg c...more >>



Paths and ArcTo in .NET
Posted by Fallen at 5/22/2007 9:10:00 AM
Hi there, Could somebody show me a decent way to do an ArcTo in .NET? Am I correct in assuming that the Graphics and GraphicsPath classes do not provide any built-in support for this? regards, T ...more >>

How to get rid of black background on Bitmap in GDI+
Posted by Jim Light at 5/19/2007 5:01:34 PM
Hi, The portions of a Bitmap that are not 'covered' by another Graphics object are left black in the final image. Is there a way to make the background white? Thank you! Regards, Jim Light ...more >>

This is how I rotate an bitmap
Posted by active at 5/18/2007 8:51:05 AM
I cut some code but this is basically how I rotate a bitmap. Can't be the best way because it takes too long! Any help would be appreciated. 'Rotate180 Dim TmpBitmap As New Drawing.Bitmap(OldWidth, OldHeight) For X As Integer = 0 To OldWidth - 1 For Y As Integer = 0 To OldHeigh...more >>

C# Printing drawing: Is it possible to update on already printed page ?
Posted by Kristijan Marin at 5/17/2007 2:22:43 PM
Hi, I need to print a report like document. So in report there are many articles and what I need when I get to the end, is to update page numbers on the second page where the Table of Content is .... or even update strings like Page 1 or 10 ... Page 2 of 10 etc .... When starting the ...more >>

Line Graphs
Posted by Chris Davoli at 5/17/2007 8:51:00 AM
I have a requirement to do a line graph on a web page. Need to be able to plot multiple lines on the graph. Any good third party tools that integrate easily into .Net or is there something in .Net framework, without a lot of fuss. I'm storing the points in SQL server. -- Chris Davoli ...more >>

Making a control transparent using C# in VS2005
Posted by KenDev at 5/17/2007 7:18:01 AM
I am trying to create a System.Windows.Forms.Control derive class that has areas that are transparent to the form on which it is placed. I want to have a circular button. It works fine if placed over an area of the form with the BackColor. However, if there is a background image, I cannot g...more >>

How to move a graphics object
Posted by Sheba at 5/16/2007 4:53:20 PM
I'm new to Windows Forms and GDI+. Simple and probably dumb question but how do I move an object (i.e. ellipse) across the screen. The msdn help just seems to confuse or give me limited info. ...more >>

The limits of the image dimension
Posted by zade at 5/15/2007 7:10:24 PM
Bitmap class have a constructor Bitmap(int width, int height), so it is possible to create a Bitmap object with the given dimension, and then you can manipulate it later. Now my work need co create enough much big Bitmap, but I don't know the limits of the image dimension. Yes , it is not the In...more >>

Rounded Corners with GDI+
Posted by Jim Light at 5/15/2007 1:21:08 PM
Hi, I would like to load up an existing image from disk and round off the edges with GDI+. Does anybody here a good reference on how to do this? Thank you! Regards, Jim Light. ...more >>

Very large image processing
Posted by TumurS at 5/15/2007 12:00:00 AM
It seems that GDI+ converts bitmaps to 32bpp when it loads them for processing. Though I needs only 4bpp images, the resulting bitmaps occupies 8 times more memory. And if bitmaps have very large sizes, the web server hangs. Are there any image processing library/modules that can operate with la...more >>

resize thumbnails
Posted by kirkski at 5/13/2007 7:31:46 AM
Hello team, I've hit a brick wall. Here's what I'm tying to achieve: When i save images to my webserver i also save a thumbnail using (Bitmap bitmap = new Bitmap(image, ThumbnailWidth, ThumbnailHeight)). The images come in both portrait and landscape flavours which means when I create the t...more >>

OutOfMemoryExceptions when using SetColorMatrix
Posted by StevenVibert NO[at]SPAM hotmail.com at 5/11/2007 6:12:30 AM
I'm writing a simple slideshow app and want to use fade-in transitions, alpha blending the next image from 0-100% opacity, on top of the current image. Seems like it should be simple enough to do using ColorMatrix.Matrix33 and ImageAttributes.SetColorMatrix to set the opacity of the next image....more >>

AddMemoryFont
Posted by James at 5/10/2007 2:39:53 AM
Hi I am having some trouble with the AddMemoryFont method. I am trying to embed an OpenType font but it keeps giving me the following: System.InvalidOperationException: Error loading font ---> System.IO.FileNotFoundException: File not found. at System.Drawing.Text.PrivateFontCollection.A...more >>

framework 3.0 and GDI+ speed question
Posted by beerintheforest NO[at]SPAM gmail.com at 5/10/2007 1:56:16 AM
Has anybody already run a GDI+ heavy project under framework 3.0? I was under the impression that framework 3.0 would pipe the GDI+ commands through WPF and thus through DirectX. And thus have some hardware support. Can anybody say something about the speed difference between GDI+ under 1....more >>

Zooming in on an image and still viewing all of it
Posted by bidalah NO[at]SPAM yahoo.com at 5/9/2007 3:38:01 PM
Hello there, I have created a program which displays a raster image and allows the user to zoom in on it to see detail. However as it stands now, when you zoom in on the image you limit viewable area of it. In other words, you cannot scroll up and down or left and right, and view the entire...more >>

Draw warp image (perspective)
Posted by Andrew Deren at 5/9/2007 12:01:01 PM
Is there a way in GDI+ to draw image with perspective warp? There is a way to have perspective warp on GraphicsPath, but I can't find a way to draw image like that. Thanks....more >>

Zero Width Pen Draws through clipped region...
Posted by Geoff at 5/8/2007 8:31:04 AM
Here is my setup: Windows Vista Ultimate Visual Studio 2005 Intel Core 2 CPU 6600 @ 2.40 GHz RAM: 2045 MB ..NET 2.0 The problem is: Using a zero width pen I can draw into areas that are not part of the clip region. Place a panel on a Form and attach to the paint event. In the paint eve...more >>

GraphicsPath size?
Posted by James Vickers at 5/8/2007 1:36:01 AM
Hi All, I hope someone can help. I need to be able to draw a freehand line (which I am doing at present in a picturebox), which is easy enough using a GraphicsPath.... however, I am stuck at the second part of my requirements, which is to record how large that freehand object is, in rela...more >>

problem with resizing 32bppArgb images
Posted by SharpCoderMP at 5/6/2007 3:02:03 PM
i have a problem with 32bppArgb images that has some transparency. i need to prepare these images for drawing and printing. in most cases images needs to be scaled down. for scaling i just do this: using(Bitmap origin = new Bitmap(filename)) { this._resized = new Bitmap( newWidth,new...more >>

How to draw a 4-way gradient
Posted by active at 5/6/2007 8:48:05 AM
I want to draw a rectangle with color changing in both directions. for example: (0,0)= 0,0,0 .. (.5,.5)=0,0,128 .. (1,1)=0,0,255 .... (.5,.5)=0,128.0 .. (.5,.5)= 0,128,128 .. (1,.5)=0,128,255 .... (1,1)=0,255,0 .. (.5,.5)=0,255,128).. (1,1)= 0,255,255 Is there a neat way to...more >>

Error on streaming new bitmap
Posted by TumurS at 5/3/2007 9:32:13 PM
exact code: try { Bitmap err_bmp = new Bitmap(200, 50, PixelFormat.Format16bppRgb555); err_bmp.SetResolution(72, 72); Graphics err_g = Graphics.FromImage(err_bmp); Font err_f = new Font("Arial", 8); SolidBrush err_b = new SolidBrush(Color.White); err_g.FillRectangle...more >>

What is the best way to draw a checkerboard
Posted by active at 5/3/2007 11:08:26 AM
What is the best way to draw a checkerboard of 10x10 pixels on a form. I could brut force it but I imagine there is a better way. The background is already white so I need only draw the black squares. Thanks in advance ...more >>

pretty complex mouse tracking..[tracking painted objs]
Posted by giddy at 5/2/2007 12:59:29 AM
Hi , Some time ago i made this little program that paints all .NET colors on a form. It elegantly figures how many boxes can fit on to the client and then paints them accordingly.It also figures the right text color. See it for yourself : http://gidsfiles.googlepages.com/Colours.exe I'v...more >>

Using system.drawing.imageconverter (change from .jpg to .gif)
Posted by Marco Shaw at 5/1/2007 10:31:56 AM
I can't seem to find an online example I can understand/apply to my needs. Can I use imageconverter to change an image from .jpg to .gif? Marco...more >>

How can I draw dynamic diagram with gdi+
Posted by Yasin Cepeci at 5/1/2007 12:06:48 AM
How can I draw dynamic diagram with gdi+ I want to draw a live diagram. I have to draw sine(sinus) like diagrams that changes by time. It slides every second a pixel left to right. I made it with setpixel() and arrays but it requires more and more memory. Is there any easy way to draw it ...more >>

get Form surface image without using BitBlt ?
Posted by Bill Woodruff at 5/1/2007 12:00:00 AM
There are many examples showing how to use the BitBlt interop calls to get the bitmap of a Form or control : for example, Bob Powells' : http://www.bobpowell.net/capture.htm I am curious if it is possible to get the Form surface image without using interop and BitBlt. The Form does expo...more >>


DevelopmentNow Blog