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
all groups > dotnet drawing api > recent posts

Displaying high-res images in .NET?
Posted by Usenet User at 4/24/2008 5:48:51 PM
..NET 1.1/2.0 I have a need to display high-resolution scrollable images in a .NET application (Windows Forms). One well known solution is to create a Panel with AutoScroll set to "true" and then add a PictureBox or another Panel to it, that is used to display the image. The above approach ...more >>


Re: Displaying high-res images in .NET?
Posted by Ben Voigt [C++ MVP] at 4/24/2008 5:04:02 PM
Bob Powell [MVP] wrote: > There are no real solutions to this problem. A 32 bit process has a 2 > gigabyte address limit but in reality the usable limits of memory in > a .NET program are somewhat less. At least, potential solutions such as MapViewOfFile aren't very accessible from C#. > ...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Christopher Ireland at 4/24/2008 10:33:03 AM
Michael, > I am unable to reply to you latest message so I Hijacked this one! No problem. Sorry for not replying earlier and giving you thanks for your reply, but I've been out of circulation for a couple of days. > You place an IDataObject on the clipboard. It is mainly used by Shell >...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Michael Phillips, Jr. at 4/24/2008 9:13:33 AM
For some unknown reason, my replies keep on getting rejected. I will try again. > Can you use System.Windows.Forms.ClipBoard.SetDataObject() to put anything > other than an IDataObject on the clipboard? No. > I was hoping to understand which string, when passed to > IDataObject.SetData...more >>

Re: Displaying high-res images in .NET?
Posted by Bob Powell [MVP] at 4/24/2008 12:00:00 AM
There are no real solutions to this problem. A 32 bit process has a 2 gigabyte address limit but in reality the usable limits of memory in a .NET program are somewhat less. GDI+ is not well suited to dealing with large images and certainly, a 14000 by 10000 full colour image would hit the s...more >>

DrawDriverString EMF Record
Posted by elziko at 4/21/2008 4:07:02 PM
Hi, I am trying to use Graphics.EnumerateMetafile in order to inspect any DrawDriverString EMF records in a metafile and then change the string that is contained within the record before using Metafile.PlayRecord to draw the modified record. Unfortunately I have found no useful documenta...more >>

Re: Text in Metafiles
Posted by elziko at 4/21/2008 2:32:58 PM
"Michael Phillips, Jr." <mphillips53@nospam.jun0.c0m> wrote in message news:OJDyBrWoIHA.4928@TK2MSFTNGP04.phx.gbl... > You may be missing some needed records for setting up the records for > playback to your chosen device. I have been looking closely at the records in the files I am trying t...more >>

Windows DPI scaling
Posted by Damien at 4/21/2008 1:10:13 PM
Hi, C# .NET 2.0 I'm developing a windows application that will run on a number of machines typically with DPI of either 96 or 120. By setting the AutoScaleMode on different forms to DPI I get the required scaling results. However, I have one form that contains a richtextbox that's anchored t...more >>



Re: DrawDriverString EMF Record
Posted by Michael Phillips, Jr. at 4/21/2008 11:45:02 AM
> Does anyone know anything about the format of the DrawDriverString data? > Or any links to some documentation - hopefully .NET based! Microsoft has not documented any of the EMF+ data formats. The best resource for the undocumented EMF+ data is here: http://www.aces.uiuc.edu/~jhtodd/Metaf...more >>

Re: Text in Metafiles
Posted by Michael Phillips, Jr. at 4/21/2008 11:37:04 AM
You should document this on Microsoft's Connect site. After, you document it you can post a link here for us to vote. Microsoft will only correct bugs and documentation errors when they are notified and enough developers vote for the changes. "elziko" <elziko@yahoo.co.uk> wrote in message...more >>

Re: How many New Courier characters fit int 6.5 inches
Posted by Michael C at 4/21/2008 10:26:01 AM
"AAaron123" <aaaron123@roadrunner.com> wrote in message news:udQNdGZoIHA.420@TK2MSFTNGP02.phx.gbl... > What is the width of a New Courier 12 point letter? > > Or, how many such characters fit into 6.5 inches? Graphics.MeasureString will tell you. Michael ...more >>

Re: How many New Courier characters fit int 6.5 inches
Posted by AAaron123 at 4/21/2008 7:50:53 AM
I know. I could even measure printer output. But I wanted to find a specification, or someone who knew what it says. Is there such a specification that specifies the value? Or maybe a common known ratio of height to width? Thanks "Michael C" <mike@nospam.com> wrote in message news:eEO...more >>

How many New Courier characters fit int 6.5 inches
Posted by AAaron123 at 4/18/2008 4:20:14 PM
What is the width of a New Courier 12 point letter? Or, how many such characters fit into 6.5 inches? Thanks in advance ...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Christopher Ireland at 4/18/2008 4:13:43 PM
Michael, > I used your code to copy a test an alpha channel .png to the > clipboard. I was able to paste the image into Word 2007 and Excel 2007. > The image displayed with transparency. That's great! Thank you very much for taking the time! Would you be so kind as to paste the code you us...more >>

Re: Text in Metafiles
Posted by elziko at 4/18/2008 3:40:47 PM
Thanks for getting me started! Originally I was just drawing my metafile straight onto my graphics object: TheGraphics.DrawImage(TheMetaFile, 0,0) Now I understand that I could replace the DrawImage method with a call to EnumerateMetafile which uses the delegate mentioned in your link. So...more >>

Re: Text in Metafiles
Posted by Michael Phillips, Jr. at 4/18/2008 11:42:04 AM
> Do you have any ideas on why this may be happening? Not without reviewing code that reproduces the problem. My advice is to try recording an Emf format Enhanced Metafile rather than a gdiplus EmfPlus or EmfPlusDual, etc. Additionally, try examining known samples of Enhanced Metafiles by...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Michael Phillips, Jr. at 4/18/2008 11:32:50 AM
I am unable to reply to you latest message so I Hijacked this one! > Thank you for the links, but neither of them make any mention of the > clipboard. The are talking about drag and drop behaviour. I was talking > about the "Drag-Drop Data" format of the clipboard (a format shown by the > C...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Michael Phillips, Jr. at 4/18/2008 9:40:19 AM
> My clients are not going to be very impressed that they cannot paste > transparent PNG images into their favourite applications when the image > has been copied to the clipboard using the PNG format. Adobe Photoshop uses a proprietary clipboard format for copy and paste of images. All ...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Christopher Ireland at 4/18/2008 9:25:12 AM
Michael, > I do not have access to Office 2003. I am unable to test your > scenario. You may be interested in testing the same scenario in Office 2007, if you have access to it. I just tested it here and again, although ClipBoard Viewer suggests that the PNG format is supported, PNG imag...more >>

Re: How to get an 8 bit non-indexed image?
Posted by Wes Lowe at 4/18/2008 2:01:49 AM
The C# version is the one I wanted and it works perfectly. I really appreciate your help, I can carry on with my project now. Cheers again! Wes *** Sent via Developersdex http://www.developersdex.com ***...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Christopher Ireland at 4/17/2008 4:52:14 PM
Michael, > Office 2003 may not support the "PNG" format. To test, copy a .png > image from Office 2003 and then check the clipboard viewer to see if > you see the "PNG" clipboard format. Using code that I have already posted for the creation of a PNG image, I saved that image to disk and ...more >>

Re: How to get an 8 bit non-indexed image?
Posted by Michael Phillips, Jr. at 4/17/2008 4:03:43 PM
> Ideally I'd like an example of a 1bppindexed file being converted to 24 > or 32bppnon-indexed file. You did not specify a language. Here are two versions in c# and vb: public static void unpack1bpp(System.Drawing.Bitmap srcBitmap, System.Drawing.Bitmap dstBitmap) { System.Drawing.I...more >>

Text in Metafiles
Posted by elziko at 4/17/2008 4:01:41 PM
Is there any way I can execute some sort of search and replace on the text inside a metafile in code? For example, if I had an instance of a Metafile I;d like to serach through it looking for anu instances of the string "hello" and replace it with "goodbye" before drawing the metafile onto ...more >>

Re: Text in Metafiles
Posted by Michael Phillips, Jr. at 4/17/2008 12:50:21 PM
> For example, if I had an instance of a Metafile I;d like to serach through > it looking for anu instances of the string "hello" and replace it with > "goodbye" before drawing the metafile onto a Graphics object. Use Graphics.EnumerateMetafile to locate the record, then edit it and play th...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Michael Phillips, Jr. at 4/17/2008 12:42:03 PM
> Again, using the same code I copied the PNG image to the clipboard using > the "PNG" format and tried to paste it into a Word2003 document. The > hourglass cursor appeared momentarily but no image was pasted into the > document. I do not have access to Office 2003. I am unable to test yo...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Christopher Ireland at 4/17/2008 10:12:24 AM
Michael, > That pretty much covers it. You can try the MSDN documentation to > get the official supported pixel formats. Great, thank you! > The clipboard viewer utility is old. It was never updated to support > the viewing of newer clipboard formats. That is why you see grayed > out ...more >>

Re: How to get an 8 bit non-indexed image?
Posted by Michael Phillips, Jr. at 4/17/2008 9:36:01 AM
> I need a way to convert it from an indexed image so I can apply a > watermark. Unless anyone can suggest how I might add a watermark to an > indexed tiff file? To convert any indexed image, use Lockbits to access the image bits directly. Create a 24bpp or 32bpp destination bitmap. For...more >>

Re: Bitmap + Clipboard + Transparency = Blue Background?
Posted by Michael Phillips, Jr. at 4/17/2008 9:22:38 AM
> Mmmm, something here then doesn't add up. Using the code for the PNG > format I posted earlier in this thread, I cannot get the image copied via > c# to the clipboard using the "PNG" format to paste into either a Word2003 > nor a Word2007 document. According to ClipBook Viewer, both these do...more >>

Re: How to get an 8 bit non-indexed image?
Posted by Wes Lowe at 4/17/2008 7:49:51 AM
Cheers for the speedy reply. I've read through bob powells lockbits page and i feel like an idiot because I don't know where to start implementing it. If anyone can help simplify this that would be great, I'm really struggling to make head nor tail of it. Ideally I'd like an example of a ...more >>

Re: How to get an 8 bit non-indexed image?
Posted by Wes Lowe at 4/17/2008 4:48:31 AM
I'm currently having a similar problem to Norbert. I have an indexed multi page tiff file, and I need to apply a watermark to the second page of the tiff. Unfortunately I can't do Graphics.FromImage(currentFile); because it an indexed image. I need a way to convert it from an indexed image so ...more >>


DevelopmentNow Blog