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

Displaying a palette
Posted by active at 6/30/2007 1:49:07 PM
Getting a palette from the clipboard I'd like to display it. Is there code available that does this? I've been Googling without success. thanks ...more >>

Selecting a region/rectangle and saving it as a TIFF for Imaging O
Posted by Steve Wood at 6/28/2007 2:38:32 PM
The following performs excellent OCR on my image using the Microsoft Office Document Imaging class (MODI): Dim miDoc As MODI.Document Dim miImage As MODI.Image 'System.Drawing.Image object Dim miImageLayout As MODI.ILayout Dim tmpStr As String miDoc.Create("C:\test.tif") miDoc.OCR() miI...more >>

resizing image defect - strange border appears
Posted by Sergei Shelukhin at 6/28/2007 2:39:21 AM
Hi. I am implementing a code that takes an image of arbitrary size, then crops it to proprotion and resizes the result to some set thumbnail size. The problem is, when the image is resized there's a visible darker border along its edges (usually top and left), 1px wide, that is often perceived ...more >>

How to create a thumbnail without reading the whole jpeg file
Posted by Tedy Pranolo at 6/26/2007 7:43:00 PM
Is there a way to read a jpeg partially to construct a smaller sized image? For example if I have a 1000x1000pixel jpeg, i want to read only every tenth pixel to create a 100x100 preview thumbnail. Is this possible? I dont want to use the previously created thumbnail in the exif data, or the th...more >>

Using Image.FromFile, I need img's resolution to agree with the file's
Posted by active at 6/22/2007 10:08:31 PM
I run: Dim img As Image = Image.FromFile(mFullPath) img has a resolution of 96 but mFullPath (a JPEG) has a resolution of 72 (used Photoshop to find the file's resolution) I need img's resolution to agree with the file's How can I do that??? Thanks in advance for any help at...more >>

How to create a bitmap with the same resolution and size as the Image object
Posted by active at 6/22/2007 8:04:03 PM
What I want is to create a bitmap with the same resolution and size as the Image object. I tried: Dim bm As Bitmap = New Bitmap(img.Width, img.Height, PixelFormat.Format32bppPArgb) Dim g As Graphics = Graphics.FromImage(bm) g.DrawImage(img, 0, 0, img.Width, img.Height) But the res...more >>

I want to implement an "automatic" color
Posted by Jeff Johnson at 6/22/2007 4:13:14 PM
In Excel, for example, you can set the text color of a cell to be Automatic. Then, when you change the fill color of the cell, Excel decides whether to display the text in black or white, depending on how dark the fill is. Is there any well-known algorithm I can use to do the same thing myself...more >>

are (*.JPG; *.JPEG; *.JPE) the same exact file types
Posted by active at 6/21/2007 8:12:11 PM
What does it mean when a program's SaveAs file save dialog box contains JPEG(*.JPG; *.JPEG; *.JPE) Are they all names for the exact same thing? For example, Photoshop lets you select the above but you never get a chance to specify one of the three. Thanks ...more >>



are *.JPG; *.JPEG; *.JPE names for the same thing
Posted by active at 6/21/2007 8:04:28 PM
What does it mean when a program's SaveAs file save dialog contains JPEG(*.JPG; *.JPEG; *.JPE) Are they all names for the exact same thing? Thanks ...more >>

luminance value for Red, Green and Blue
Posted by active at 6/21/2007 10:12:56 AM
Bob Powell's site says: The effective luminance value for red is 0.3086. Green has an effective luminance of 0.6094 and the value for blue is 0.082 I've seen the values: 0.299, 0.587, 0.114 Can someone tell me where the two sets come from? Thanks ...more >>

Reading animated GIF files
Posted by active at 6/21/2007 9:26:51 AM
Bob Powell's site advises that one can not create animated GIF files using GDI+ image encoders. What about reading them into Bitmaps. Is that possible? Practical? thanks ...more >>

Encoder Parameters questions
Posted by active at 6/21/2007 9:22:08 AM
In Photoshop one can save a jpg file after specifying: "Quality" and a Format Option("Baseline Standard", "Baseline Optimized" or "Progressive") At his site Bob Powell shows how to specify jpg "Quality" in DotNET. 1) Is it possible to specify "Format Options" for a jpg file? 2) How does o...more >>

CMYK to RGB Error
Posted by at 6/21/2007 8:47:53 AM
I have a VB.NET application that accepts a 300 dpi CMYK Tiff and downsizes it to an RGB JPEG, which works great. The only problem is the coloring seems to darken and become muddy, with oranges becoming browns, etc. Has anyone else had this happen, and hopefully found a way to fix it? ...more >>

Low Quality text in System.Drawing
Posted by Eugenio at 6/20/2007 11:13:13 AM
Hi, I'm working in a image generator, using C# with ASP.NET 2.0. I'm generate some imagens in disk , in my machine everything works , but when i put the application in a server prodution , the text don't have the same highquality. Can occur some difference in System.Drawing.DrawString...more >>

how to drawimage with rotation
Posted by active at 6/19/2007 7:18:24 PM
Say we have a bitmap 100x100 and a Graphics object go containing a rotation of 45 degrees and the appropriate translation If we want the picture to be unchanged but rotated when we do gr.DrawImage(bmp,?,?,?... Thanks for any help ...more >>

User Control with transparent background flicker problem.
Posted by DugrHill at 6/15/2007 10:49:01 AM
I'm trying to create a custom control with a transparent background. I am using Bob Powell's excellent example Creating transparent Windows Forms controls. http://www.bobpowell.net/transcontrols.htm The code works great and has taught me a lot. My issue is that I need to be able to move ...more >>

Deallocating memory of a Bitmap created with a pointer to image bits
Posted by anpasq NO[at]SPAM gmail.com at 6/15/2007 10:19:49 AM
As described in the article KB814675 http://support.microsoft.com/?scid=kb%3Ben-us%3B814675&x=9&y=17 "When a Bitmap object is created with a pointer to image bits, the new object may or may not use the memory at that address as backing for the image. Therefore, the application must make sure t...more >>

Camera flash effect
Posted by jaffar.kazi NO[at]SPAM gmail.com at 6/13/2007 4:53:37 PM
Hi, Can anyone give me concrete ideas or sample code as to how to show a camera-like flash effect? I would like to do this for a screen capture utility I'm developing, which can take a "picture" of some area on the monitor? Thanks in advance, Regards, --Jaffar ...more >>

FillRectangle & SolidBrush Color Problem
Posted by NathanC at 6/12/2007 2:28:00 PM
I want to start a new post with a clean slate - here is my problem. The 5 lines of code below work brillantly - it draws a nice blue box. The problem is that if you replace line 3> with line 6> below, the box isn't drawn. The long RGB value is valid (and not black btw). I have tried all mann...more >>

Adjusting components size by text and font
Posted by Oron.Morad NO[at]SPAM gmail.com at 6/10/2007 11:17:29 AM
Hello, I develop C#.NET (WinForm) over 2003server. I am looking for a way to adjust a component size (width pixels) according to a given text of a certain font (i.e font family, size and style) Lets say i have a sentence(english or hebrew), i want the textbox to expand and minimize if i ch...more >>

Saving a panel to a Graphics (Printing)
Posted by she_prog at 6/9/2007 10:58:26 AM
Dear All, I need to save the content of a panel to a bitmap. The panel can have many child controls which also need to be saved. The problem would be solved if I could have the panel saved to a Graphics object, which is the same as if I'd need to print it. It'd be easy using Control.DrawToBit...more >>

Panel with double buffer
Posted by active at 6/8/2007 7:42:08 PM
A Panel object does not allow DoubleBuffered to be set. Simply creating a new control as below allows one to set that property so it isn't that it can't be done. It's just a little harder. So, why did they set the property (or any property) to Protected? What's the rational? ...more >>

My custom control has issues
Posted by Jeff Johnson at 6/8/2007 5:11:29 PM
I posted a thread a couple of weeks back titled "I need to zoom a bitmap with no interpolation". After getting my answer, I proceeded to start working with Bob Powell's zoompicbox code and found that it needed some tweaking for my purposes. Ultimately I have written a new control using piece...more >>

Dynamically create Drawing.Pens color?
Posted by NathanC at 6/8/2007 11:16:01 AM
I am getting a long RGB value and converting it like so: fore_color = Drawing.Color.FromArgb(color_value) back_color = Drawing.Color.FromArgb(color_value) I want to use fore_color and back_color as the line and fill colors respectively on a DrawRectangle: Up to 300 seats can be drawn on ...more >>

Draw Rectangle directly to client (ie - without bitmap?)
Posted by NathanC at 6/8/2007 8:44:03 AM
I am trying to draw a rectangle for every record in a dataset. The drawing function will occur within a For Each loop and each record has a different XY position, so the idea is that the final result will have a single image with multiple rectangles. I have tried using bitmap methodology of d...more >>

Big image troubles
Posted by mike at 6/7/2007 12:00:00 AM
hi all i'm drawing an image and transforming a section of it with a colour matrix. When i change the image i save the section before changing it (for an undo) this works fine with most images but for some reason when the image is really big the undo doesn't redraw correctly, i end up with ...more >>

Simple PictureBox questions
Posted by active at 6/7/2007 12:00:00 AM
Using the Image of a PictureBox to display a bitmap and allow simple adjustments such as cropping and rotating, and then resaving it or printing it: Must the Image always display located at (0,0) in the PictureBox's client area? If the image file contains a DPI of, say, 300x300 and is, s...more >>

Fast and simple way to determine bounds of difference...
Posted by Christian Stapfer at 6/6/2007 12:00:00 AM
In order to update images located at remote peers that differ only slightly, I want to determine the smallest rectangle that contains the part in which two given images differ so that I can send relatively small update messages instead of the whole new image. I have written a simple funct...more >>

Is it OK to change the Paint event Graphics object?
Posted by active at 6/5/2007 6:21:18 PM
OK to do: e.Graphics.InterpolationMode = InterpolationMode.HighQualityBilinear in the Paint event code? What I'm wondering is the Graphics object belong to and may be used by the creator. Is it OK to change it? Thanks ...more >>

what is the resulting PixelFormat
Posted by active at 6/4/2007 8:35:43 PM
When I create a New Bitmap from a stream, or a filename, or an Image what is the resulting PixelFormat? Thanks ...more >>


DevelopmentNow Blog