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 2005

Filter by week: 1 2 3 4 5

Lossless Jpeg Patching
Posted by Andreas Zita at 5/31/2005 11:39:33 PM
Hi! I have a series of JPEG images I wan't to combine into one by just patching them together in a row. I code I have written now however recompresses the final ouput. Is there any "easy" way to patch my images without recompression, lossless? /Andreas Zita ...more >>


Drawing a line with a bevel ot sunken effect
Posted by Craig at 5/31/2005 6:26:03 PM
Hi I'm trying to draw a 1px horizontal line that has a sunken/bevel effect. Same style as the seperator lines displayed in a file property dialog (open Windows Explorer, right click a file, select Properties) Fairly new to WinForms, so any suggestions are appreciated. Craig...more >>

DrawImage bug?
Posted by Gary at 5/30/2005 10:18:01 PM
I'm using DrawImage to draw to walls, one at the top of the screen and one at the bottom. I've got an image which is 32x16 and DrawImage stretches it to ClientWidth x 16. The trouble is, it doesn't complete the end section (It seems to blend the end section with the colour it's writing over). ...more >>

PrintDocument
Posted by Palli Olafs at 5/30/2005 9:08:20 PM
Hi guys I need some help!!! Im now printing out some complex WinForm that holds various controls. This prints out prefectly but know I need to be able to save this printout as PDF??? So I like to ask you if there is some way to save the PrintDocument object as PDF??? Thanks Palli ...more >>

trouble with Graphics.DrawPolygon
Posted by Dennis Rosenkvist at 5/29/2005 12:00:00 AM
Hi I have a jagged array of Points, ie an array of polygons that I want to draw, using code like this, g being the Graphics object: foreach(Point[] poly in polys) g.DrawPolygon(Pens.Black, poly); My problem is that what is outputted is similar to what i would expect if I called D...more >>

How come Image.FromFile() member function is not avaiable?
Posted by Gravity at 5/28/2005 12:00:00 AM
Hi, Refering to the title, I am using Visual Studio .NET 2003, WInXP Pro SP2 to develop C# on PocketPC. To me surprise, I cannot locate the member function, FromFile( ) from the System.Drawing.Image class. My VS only show 8 members functions from the class; (1) Dispose (2) Equal (3) ...more >>

Error in Replace Colors In Image and Save it!
Posted by Prasad Dannani at 5/28/2005 12:00:00 AM
Hi, I created a Windows Application which accepts the filename to open and two color values. The Application opens the given bitmap file and replaces the first color with second color. I done by traversing through the pixels. After completing the whole process i have to save the image to ...more >>

Saving Grayscale image as real grayscale
Posted by bert at 5/27/2005 12:00:00 AM
I want to save an image which I converted to grayscale as a real grayscale image. When I save the image and open it in photoshop, the mode is RGB color/ 8bit. I want the mode to be grayscale. I've been searching for a solution for my problem for some time now but I can't seem to find an ...more >>



Invalidating a region and having only that region drawn
Posted by Andrew at 5/26/2005 6:57:01 PM
Hello, In my application I perform all the drawing operations from within the form's OnPaint method (the form is ultimately a TabPage derivative) ie protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); //the base class LayerView.OnPaint handles things like AutoScr...more >>

Handling "hide underlined letters until I press ALT" setting
Posted by Scott McChesney at 5/25/2005 11:13:41 AM
Folks - I've done some Google searches and come up with nothing. If this has been addressed already, please point me in the right direction. I'm creating a custom Label control for one of my projects, so I can utilize text trimming. I'm inheriting from a standard Label control and overri...more >>

onPaint handler
Posted by YYZ at 5/25/2005 11:13:31 AM
Is there anyway to get an onPaint handler for a textbox? In VB 6 I would subclass the control (never done it with a textbox, but I think it would have worked), but I don't think I can do that here in .Net. Matt ...more >>

Scrolling again
Posted by Steve Magoon at 5/24/2005 12:38:58 PM
Hey, Could someone help me with the following code? I would like ObjectB to remain stationary on the panel while scrolling ObjectA, but I can't figure out how to do it. If I'm saving the Graphics state, it seems to me that any scrolling should not affect ObjectB when I draw it, but only Obj...more >>

Bitmaps and graphics
Posted by Bilal Abbasi at 5/24/2005 12:30:14 AM
Is there a way to create a Bitmap object and draw strings within it. Graphics g = pic1.CreateGraphics(); Bitmap b = new Bitmap(100,100, g); does not work. Or do I have to get into the nitty gritties of the Font object find the position of each pixel in it and use the SetPixel method??? ...more >>

Complex Shapes Over other Windows (I can see it being done!)
Posted by Phil Jones at 5/24/2005 12:00:00 AM
Has anyone seen a widget app called "Konfabulator" (www.konfabulator.com). Interestingly enough it renders the new mac Tiger widgets on a Windows PC. What's most interesting is that the widgets are complex, semi-transparent shapes that reveal the windows and desktop behind them (for instance ...more >>

Appending one image to other
Posted by Saurabh at 5/24/2005 12:00:00 AM
Hello All, I am new to the image processing things, hence this question might be a bit silly but I could not find any obvious solution.... I have an image object which is to be shown in a picturebox. The picturebox can actually change the size depending on the anchor / docking of the form....more >>

Copying Vector Image
Posted by Mike King at 5/23/2005 12:01:02 PM
I have created a .NET control, and I want to add the ability to copy/paste the image of the control to MS Word. The tricking thing is that I want the vector image not a bitmap. Does anyone know how to do that? Bitmap PlotBitmap = new Bitmap(500, 500); Metafile mfile = (Metafile) ((Image)...more >>

GDI+ Flat API, High-Resolution Drawing?
Posted by george NO[at]SPAM neosoft.com at 5/23/2005 11:11:33 AM
Using the GDI+ Flat API, I am able to draw at 96dpi resolution to a VB6 PictureBox control, and (awkwardly) dump the image to gdi+ supported file formats, like tif. I need to create higher resolution (say 360dpi) tif files. It seems that .Net can create a high-resolution, in-memory bitmap obj...more >>

GDI+ Flat API, Odd Issue with Dash and Smoothing
Posted by george NO[at]SPAM neosoft.com at 5/23/2005 11:01:06 AM
I'm using the GDI+ flat API version 5.1.3102.2180 (latest/good version? The SDK shows 5.1.3102.1360!). When I attempt to set smoothing to anything other than AntiAlias, while using a dash pattern other than solid AND the pen width is 1 pixel wide, the pattern is in inches rather than in pixels...more >>

exception while Creating a bitmap from xml file
Posted by jay jay via .NET 247 at 5/23/2005 10:16:12 AM
Hi, I am trying to create a image from an xml file. Xml file has string representation of a image. here is the code snippet: DataSet ds=new DataSet(); ds.ReadXml("Northwind.xml"); string pic=ds.Tables[1].Rows[0][3].ToString(); byte[] str=Encoding.UTF8.GetBytes(pic); MemoryStream s...more >>

Problem using GraphicsPath
Posted by Richard L Rosenheim at 5/23/2005 7:56:43 AM
When I use the following code: myFont = new Font("Tahoma", 24, System.Drawing.GraphicsUnit.Point); GraphicsPath pth = New GraphicsPath(); pth.AddString("Sample", myFont.FontFamily, (int)myFont.Style, myFont.Size, new Point(x, y), StringFormat.GenericTypographic); ...more >>

3D transformation
Posted by Lebesgue at 5/23/2005 12:00:00 AM
Is it possible to "emulate" 3D transformation using GDI+ somehow? I would like to rotate a string around vertical axis. I know how to apply rotation transform to Graphics object, but only as 2D transform. I think this will not be possible directly, but hope there is a chance to do it using some...more >>

Create Bitmap from byte[]
Posted by Ondrej Sevecek at 5/23/2005 12:00:00 AM
Hello, I have a byte[] array containing values of 0-255 representing gray levels of a picture. This has no common format (.bmp, .jpg, ...) it only stores the bytes, one per a pixel. I converted it from original matrix byte[,] so I know its real dimensions. Now, I would like to display thi...more >>

Scroll panel image
Posted by Leif Eirik Olsen at 5/23/2005 12:00:00 AM
Hi all, On a panel where I initially draw a Line, I would like to : Copy the image of the Panel Rewrite the copied image back to the same panel, but 1 pixel to the left of it origin position. Feel like I've tried everyting, but nothing seems to be correct. I'm sure I'm missing something ob...more >>

DrawImage and ImageAttributes to show pixelized scaled bitmap
Posted by Ondrej Sevecek at 5/23/2005 12:00:00 AM
Hello, I have a bitmap. I use DrawImage() method to show the bitmap. It can scale the picture according to the destination rectangle.. DrawImage( image, scaleToRectangle, 0, 0, imageWidth, imageHeight, Pixel, imageAttributes ); The scaled picture is smooth and its origin...more >>

Invalid parameter used exception while creating bitmap
Posted by jay jay via .NET 247 at 5/22/2005 2:04:24 AM
Hi, I am trying to create a image from an xml file. Xml file has string representation of a image. here is the code snippet: DataSet ds=new DataSet(); ds.ReadXml("Northwind.xml"); string pic=ds.Tables[1].Rows[0][3].ToString(); byte[] str=Encoding.UTF8.GetBytes(pic); MemoryStream s...more >>

Same Error
Posted by jay jay via .NET 247 at 5/22/2005 12:08:55 AM
(Type your message here) -------------------------------- From: jay jay hi got the same error, byte[] imByte=Convert.FromBase64String(Imagetext); Bitmap b = (Bitmap)Bitmap.FromStream( new MemoryStream(imByte)); // This line is throwing error. Somebody please help me. ---------------...more >>

How to get the compression type of an Image file
Posted by pierrev at 5/20/2005 12:34:03 PM
Hi, I'd lik to know how to get the compression type (LZW, CCITT, RLE, etc) used in a bitmap file. Thanks...more >>

Bitmap saved to stream is 70 times larger than the same Bitmap saved to file!
Posted by Joakim Olesen at 5/19/2005 8:44:06 PM
Hi. I'm loading bitmaps into memory, and then I need to save them to a stream. The problem is, that when I save the bitmaps to a stream, it gets much bigger (in kilobytes) than if I save the same bitmaps directly to a file. the bitmaps are about 2500x3500 pixels. For instance, the following...more >>

How to do this drawing in .Net?
Posted by Galaxia at 5/19/2005 12:00:00 AM
SGkgQWxsLA0KDQpUbyBwbG90IGEgY2lyY2xlIHdpdGggY2hhbmdlYWJsZSByYWRpdXMgYnkgbW92 aW5nIG1vdXNlIG9wZXJhdGlvbiwgSSBhbHdheXMgd3JpdGUgInBEQy0+U2V0Uk9QMihSMl9OT1RY T1JQRU4pIiBpbiBWaXN1YWwgQysrLiBNeSBxdWVzdGlvbiBpcyBob3cgdG8gcmVhbGl6ZSBpdCBp biAuTmV0IChJJ20gdXNpbmcgVlMgMjAwMykuIFRoZSBmb2xsb3dpbmcgaXMgYSBzZW...more >>

Splitter line
Posted by ramida at 5/18/2005 4:31:56 PM
Hi there, Does someone know how to draw a splitter line similar to the splitter line in the Visual Studio .Net IDE, or the splitter control? I'm aware of the DrawReversibleRectangle function for drawing rubber-band or drag/focus lines, but the splitter line from the Visual Studio IDE (or t...more >>

Menu bar style
Posted by Patrick Braunschweig at 5/18/2005 9:40:39 AM
Dear Ng, is it possible to modify the look (e.g. the backcolor) of the menu bar (The one with File, Edit, View, etc..) after I've added it to MyForm? Many thanks and best regards, Patrick...more >>

In fairness to the speed of GDI+
Posted by Andrew at 5/17/2005 4:23:29 PM
Hello , I recently posted a question regarding the apparent poor drawing speed of GDI+ and received valuable assistance regarding strategies that involved double buffering... It is only fair to report that since I have removed alot of debug type code (eg Console.WriteLine(........) th...more >>

Create an Image
Posted by Programmer at 5/17/2005 12:00:00 AM
Hi all Here is my problem I want to create an image so i can pass it on an object to put it as watermark in my pdf report Here is what i have write so far Dim objBitmap As System.Drawing.Bitmap Dim objGraphics As System.Drawing.Graphics Dim cstream As System.IO.MemoryStream Dim ...more >>

converting transparent gif to jpg
Posted by geoff at 5/16/2005 11:51:33 AM
I have used this code... //'get original bitmap Bitmap myBitmap = new Bitmap(Server.MapPath("CompanyProfileLogo/" + cid + ".gif")); //'create thumbnail from the orginal bitmap Bitmap myThumbNail = new Bitmap(myBitmap, 120,90); //'Set the content type Response.ContentTyp...more >>

Titlebar like gradient?
Posted by mr.mike.ward NO[at]SPAM gmail.com at 5/16/2005 11:31:38 AM
I'ld like to draw a bar in a windows form (C#) with a similar look and shading of the Windows XP themed titlebar. Anyone have some code to do this? Regards, - Mike ...more >>

Color Constant
Posted by John Hom via .NET 247 at 5/15/2005 4:57:18 AM
How come the following snippet compiles: Using System.Drawing; public const GraphicsUnit DISPLAY_UNIT = GraphicsUnit.Point; public static readonly Color PRINT_COLOR = Color.Black; while this snippet fails: Using System.Drawing; public const GraphicsUnit DISPLAY_UNIT = G...more >>

draw line?
Posted by Saladin at 5/14/2005 12:00:00 AM
hi Guys Using VB.Net, Winforms. Just starting out so bear with me. I can't locate a control to simply draw a horizontal line (or vert). Just want to draw a line on a form. Actually just want to separate a few labels with something like a line, but can't figure how to do it. Do I need code f...more >>

Replace pixel color
Posted by Mark Heath at 5/13/2005 4:51:03 AM
I have some PNG files containing icons that are entirely one color - a forground color of gray and a transparent background. I have loaded these into Bitmap objects that I am painting using the DrawImage command. I would like to sometimes paint the same icon, but with a different foreground co...more >>

BarCode
Posted by Josh at 5/13/2005 12:00:00 AM
I'm sending a Barcode image to a PDF. On some printers if prints fine, on others its all speccy and mushy looking. Now the Image format I'm using Jpeg, can a Jpeg be reduced to 2 colors and no antialiasing? ...more >>

Poor drawing speed due to C# or GDI+ ? (Important issue)
Posted by Andrew at 5/12/2005 9:13:01 PM
Hello , GDI + seems a well designed and easy to use graphics platform. I am using GDI+ to write the graphics module of a construction based application that also involves a data entry forms module and database module amongst others. I completed the data entry and database modules using...more >>

OnPaint Function Issue
Posted by Andrew at 5/12/2005 8:41:01 PM
Hello, I have a couple of drawing routines that involve drawing basic shapes and I am calling these routines from the my views OnPaint handler . This view class (BuildingView), is a derivative of a generic view class (LayerView), which is itself a TabPage derivative). Other views (C...more >>

How to fill space between two rectangles
Posted by BPatel at 5/12/2005 10:28:32 AM
Hi, I need to fill space between two rectangles with different color. Small rectangle is within the big rectangle. Please let me know how to do it in C#. I could not find a way to get the region of outer Rectangle which is not intersected with the smaller rectangle. Thanks, bpatel ...more >>

passing IMAGE to FreeImage function
Posted by Sanjay at 5/12/2005 12:00:00 AM
hi, how can I use FreeImage in .Net..Their functions like freeimage_adjustContrast ask a parameter "dib" How can I obtain the same from Image in .net. I m working in VB .net Any help is appreciated. thanks sanjay ...more >>

drawing lines between objects.
Posted by WAkthar at 5/12/2005 12:00:00 AM
I have a picture control to which I've added icons in different parts of the control. I also have modeless dialogs which appear when a user clicks on these icons. I need to be able to draw a line from the icon to the dialog, and when the user moves the dialog, redraw the line so it is always ...more >>

Drawing border around control
Posted by Steve Severance at 5/11/2005 11:50:02 AM
I am building a GUI that allows the user to move controls around at runtime. At present the can only move controls derived from a base class MyContatiner. These containers are higher level controls that contain the basic windows controls. I want to draw a border around the container and then h...more >>

Save / Write a PCX file from an Image
Posted by garyalfred at 5/11/2005 11:29:04 AM
I need to write out an 8bit PCX file from an Image or Bitmap object i've created using a GraphicsPath. I had hoped it would be as easy as saving it out using an ImageFormat member, but alas there is no PCX ImageFormat member. >From what I can tell I am going to need to construct this file one ...more >>

Specifying a particular Font
Posted by Eric NO[at]SPAM PWS at 5/11/2005 11:24:01 AM
Hi. I want to use Helvetica Black with the Systems.Drawing (GDI+) library. I know how to use Helvetical bold (font family Helvetica + style Bold), but is there any way to specify a non-bold but bold-related font such as Semibold, Extrabold, or Black? Thanks Eric -- Eric Valinsky P...more >>

Draw windows controls
Posted by Dees at 5/11/2005 4:10:03 AM
Hi, I need to draw the TextBox, OptionButtons, CheckBoxes etc. controls. I do not need to customize any of their default display properties - I just need to draw the controls as they appear at runtime - very basic requirements - it just has to be of defined length and should contain the spe...more >>

Using autoscroll
Posted by Steve Magoon at 5/11/2005 12:00:00 AM
I would like to autoscroll objects as I select them (via hit testing), separately, on a panel. In other words, if I select drawing (A) with the mouse, then the autoscroll function would apply only to that object. Is this possible with autoscroll, or is there a better way? I have several object...more >>

Join two images
Posted by dave bray at 5/11/2005 12:00:00 AM
I can join two images together (transparent gifs) by drawing them on a form; and the saving the form; I want to join images from within an asp page, and don't want to use a form currently i do this; ===================================================================== ' api supporting fu...more >>


DevelopmentNow Blog