| BitBlt Managed Version (12 replies) |
| microsoft.public.dotnet.framework.drawing |
| hi all i am porting some code from C . i have two bitmaps. i am using BitBlt to transfer pixels from one to the other. now, in dotnet, i have again, two bitmaps, but i don't know how to transfer pixels from on to the other. so what exactly to i do? assaf |
|
| Font.Dispose() and ArgumentException (8 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I've got a button on a form with the following click eventhandler: private void button2 Click(object sender, System.EventArgs e) { Font tempFont this.label1.Font; this.label1.Font new Font(this.label1.Font.FontFamily, 8.25F); tempFont.Dispose(); } If this code is executed twice (two clicks on the button) I get an System.ArgumentException in System.Windows.Forms.dll and there is no call stack. I tr... |
|
| Viewing files from DB (4 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hi I have a problem when I try too view images from SQL server. The image is stored in a database but I dont know how I can view the file in my form. I dont want to save it on the disk first. Can anyone help me. Palli |
|
| Repost re getting / setting information from Drawing.Image (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi, Sorry to repost, but I still think I must be missing something elementary. Given an Image that may / may not have an alpha channel and came from disk, it seems to be possible to extract the colour space (RGB, CMYK, grey etc) and bit depth from that image from a combination of ImageFlags and PixelFormat. When you create a Bitmap (say), you can't manually set the Flags parameter, so you seemingl... |
|
| Drawing multiple fonts to a richtextbox? (4 replies) |
| microsoft.public.dotnet.framework.drawing |
| I would like to write text in multiple fonts to a scrollable text viewing control. Is this possible? I can use GDI to write multiple fonts to the clientwindow area, but the client window area is not scrollable(?). Thanks, Dean Slindee |
|
| How to use the Transformation of Pen/Brush? (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Pen/Brush also has Transformation property and Translate/ScaleXXXX method. But I dont' understand how to use it. Is there any document on these? Thanks! |
|
| AntiAlias a Tiff Image with GDI+ (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Is there any way to antialias a tiff using GDI ? Most imaging applications may also refer to this functionality as "Scale To Gray". I have reviewed Bob Powell's FAQ on "Convert color to grayscale", but as the title implies this only works properly with Color Images. I am working with a 1 Bpp tiff image (I think) and would like to smooth the appearance of the image when it is drawn. Some sample cod... |
|
| Drawing a circular gradient (3 replies) |
| microsoft.public.dotnet.framework.drawing |
| I want to draw a gradient, much like the gradient drawn by a linear gradient brush, along a circular path. I have experimented with the PathGradientBrush, but I don't think it does what I want. Basically, I want to be able to specify 2 colors and have the gradient drawn like in the image. Any help would be appreciated. Thanks, Abhishek |
|
| Draw a line (4 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hi. I want to do something like paint. I want to draw a line. So, the first clic indicates the beginning of the line. Then, while I have not clic again, the line is following the cursor. So, when I begin to draw the line, I copy the bitmap with my drawing. Then, I draw the line, and when the cursor move, I draw the saved screen. Here is what I obtain : http://img26.exs.cx/img26/4302/GRRRRRRRRRRRR.... |
|
| Request for Help: PixelFormat (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi, I am developing an application. This will acquire data from Imaging Device. The Data is in 256 Gray Color.(8 Bits per Pixel) I am creating Image using public Bitmap(int, int, int, PixelFormat, IntPtr) method. This method works fine for Color, and B&W. But for 256 Gray colors I am not sure what PixelFOrmat I should use. For Color I have used PixelFormat.Format24bppRgb For B&W I have used PixelF... |
|
| How to copy Image transparently? (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I have two Image: A and B. When I draw Image B, it's background is not drawn. I'd like to copy content of B to A, and don't want the background of B overwrite the content of A. How coud I do that? Thanks! |
|
| Image.Save( ..., ImageFormat.Bmp ) slow in simple case (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| If I read a bitmap image from one file and save it to another the save operation is slow unless I draw on the image. In other words, Image inputImage Image.FromFile( @"c:\temp\source.bmp" ); using ( Graphics g Graphics.FromImage( inputImage ) ) { g.DrawLine( new Pen(Brushes.White), 0, 0, 1, 1 ); } inputImage.Save( @"c:\temp\sink.bmp", ImageFormat.Bmp ); is many times faster than Image inputImage I... |
|
| Center DrawBezier on Form (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hi, given a Bezier Spline drawing, how do you center it at the form its painted to? example: e.Graphics.DrawBezier(New Pen(Color.Black, 10), 10, 10, 20, 30, 40, 20, 60, 70) Thanks, Henry |
|
| Need help with ExtFloodFill in C# (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi all, I searched for this for a long time, found nothing so far. I have a Bitmap object in memory, with some content this bitmap is then displayed on screen. I have a brush object (hatch/texture/etc. I need all of them to work) which I want to use to paint an area of the picture using FloodFill or ExtFloodFill. (Using any of the Graphics.FillXxxx functions is out of question as there is no regio... |
|
| Override ListView Paint events? (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hi, all: I'm trying to subclass a ListView ("override" in C#) to change the graphical behavior when an item is selected. Trouble is, I can't seem to find the event. I overrode the OnPaint event in my derived class, but it never gets fired. Can someone please help me? My ultimate goal is to replace the grey overlay (in the Icon view) with a big X through the icon. Thank you much, /m |
|
| XOR Pen in .Net 2? (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Anybody knows if .Net 2 will support drawing on XOR mode. I have been using the ControlPaint.DrawReversibleLine functionality but it's really aggravating and you can only do line and squares not other shapes. Thanks. |
|
| How to save an 8-bit BMP file? (3 replies) |
| microsoft.public.dotnet.framework.drawing |
| I have a need to save a windows bitmap file in ONLY 8 bit color from a 24 bit Bitmap object. I tried grabbing the BMP imageCodec object and creating an EncoderParameter for the Encoder.ColorDepth parameter specifying a value of 8, and using these in the Save(...) operation, but it still saved the image as a 24 bit image. Here's the code I used: EncoderParameters encoderParameters new EncoderParame... |
|
| C# Screensaver - render causing 100% CPU usage (3 replies) |
| microsoft.public.dotnet.framework.drawing |
| I have written a screensaver application in C# .NET and have noticed that whenever the animation loop is running CPU usage always spikes up close to 100%. My application uses a paint thread which is set at 100ms. the program looks sort of like this: // constructor public Form1() { InitializeComponent(); // initialization code tmrPaintRefresh new System.Timers.Timer(100); tmrPaintRefresh.Elapsed ne... |
|
| C# question: how do I make the ProgressBar dimmed/gray (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Using ProgressBar.Enabled false does not dim the progress bar. There must be a way. I hope somebody could guide me. Thanks. |
|
| gdi+ graphics.MeasureString() (5 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Is there any way to make this function return accurate numbers ? I have tried a lot of StringFormat flags etc and it always returns unaccurate numbers. I want to make a control that display text with word wrapping ( I don't want to use the drawstring word wrapping for some reasons) but I can't since MeasureString won't give me accurate results, how should I do ? |
|
| Get DC for sys.dr.bitmap (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hello All, I've been working on this for several days now and could use some direction so thanks in advace for any help. I have a COM method which needs "the handle to the device context for the bitmap." I'm guessing that it's expecting a DIB but I'm not certain. If so, how do I create a DIB from a GDI bitmap? Here's the code I've written so far for creating the device context. But the result is a... |
|
| is there a way to copy multi gif images to a jpeg without losting color? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I created a image with true color : mapimage new Bitmap(mapwidth,mapheight,PixelFormat.Format32bppRgb); and then use DrawImage to draw some dozens of gif file on it, but some colors lost, I think the image has enough colors. Any idea? Thanks! |
|
| A Table and GDI+ challenge in ASP.NET (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hello everyone Firstly I have to apologise because this post will be a lengthy one. Having Windows XP pro, VS.NET 2003 pro, SQL Server 2000 and .NET 1.1 properly installed, I came upon an idea to make a web application, that will enable users to play chess online with a fellow player. Following series of excellent articles on security, authorization, authentication I successfully built a relativel... |
|
| Can't create animated gif? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi guys, I'm trying to figure out: is it possible to create animated gif using C#(.Net). I'm getting GDI exception when using Bitmap.SaveAdd function... Any help would be greatly appreciated! Thanks. From: Tigran Kostanyan Posted by a user from .NET 247 (http://www.dotnet247.com/) Id 3JC6JPJEfUyF7SZcMhBsXw /Id |
|
| ImageAttributes SetToIdentity Method Missing? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| The online documentation for GDI shows a SetToIdentity method for the ImageAttributes class. But, I can't use this method in a VB.Net 1.1 project. It doesn't show up using IntelliSense or the online help. Most (but not all!) of the other methods do appear. What am I missing please? Best regards, George |
|
| mapping Font Name to windows/fonts file (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi, I am trying to map a font name to the filename in windows/fonts directory. This needs to be in a CSharp program. The user can change the font using FontDialog or a editing a dataset. The font names currently needing mapping are: arial arial black microsoft sans serif cosmosbq light trebuchet ms helvetica book antiqua bankgothic md bt Robert |
|
| Magnify Area w/ Transparent Windows To Form (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi, I'm trying to create a simple magnifier program, where it would magnify an small area under the mouse coordinates, catch is, it should also capture and magnify Transparent Forms, and paints everything to the form. I've manage to solve this problem using the follwing method. 1. Create new Bitmap variable and save it inside the Graphics variable Dim b As New Bitmap(CInt(blitAreaX), CInt(blitArea... |
|
| Drawing a string that follows an arc (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hello, Is there a way to curve a string of text along an arc? I've looked at the GraphicsPath object to create the arc and GraphicsPath.AddString( ) method to add a string to the path. But I believe this is limited to drawing the string horizontally. Thanks, Ed |
|
| Specifying the center point for a rotation (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| I'm rotating an object (eg. a GraphicsPath) using the Matrix.Rotate method. Eg: Dim myPath As GraphicsPath Dim matrix As New Matrix matrix.Rotate(Me.Rotate) myPath.Transform(matrix) Is there a way specify the center point around which the rotation occurs? Thanks everyone, Phil (Auckland | Aotearoa) |
|
| How To: Improve image drawing perfomance? (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| hi all. i have a dot net form with a background image. the image size is 1024 x 768. i set the form's AutoScrollMinSize to 1024 x 768. i run the app. when i gently scroll the form, the cpu shoots up to 100%. a similar unmanaged application using BitBlt does not invoke to cpu at all. how can i get my dot not form to perfom better with images? assaf |
|
| scale custom line cap (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| How to scale custom line cap (to match current Matrix & PageUnits)? To create it I need to provide only a set of points... should I call graphics.TransformPoints on the points? But it could unnecessarily translate them, I only need to scale (not forgetting about page units). Is the only option to manually scale the points? How are the system's default caps automatically scaled? |
|
| How to use palette? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| hi all i would like to use a palette in my application. is there any code sample out there that i can learn from? assaf |
|
| BitBlt in unmanged C++ (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| hi all i need to get the maximum perfomance in my PcAnywhere application. should i write my viewer in unmanged C ? assaf |
|
| Non-Overlapping Ellipses (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi All, I need to create ellipses and lines connecting them, in a hiearchical manner. Root Ellipse N number of lines radiating from it, each having an ellipse at the other end and so on. Now, how to ensure that the downstream ellipses do not overlap each other. I know that this is a very complex problem. Any ideas, directions, etc Thanks for all the help From: Mohammad Tanveer Posted by a user fro... |
|
| how to use a palette? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| hi all question in short version: look at www.realvnc.com we are writing the DotNet version. so we need to transfer bitmaps in a minimalist format. vnc does it using palettes, we would like to do the same. question in long version: we have a PcAnywhere dot net. we capture parts of the desktop (only those that have changed). and then we send them. on the 'manipulating' side (where we display the de... |
|
| How to achive a pen that can draw railway symbol? (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| The pen/brush in GDI seems very powerful. I am wondering if it could draw the railway symbol on the map. The symbol looks like a snake with rings on its body. Has anyone ever tried that? Thanks! |
|
| How to draw a chord without interop? (3 replies) |
| microsoft.public.dotnet.framework.drawing |
| hi, The Graphics class does not provide a DrawChord method. So what is the easiest way to implement something like DrawChord(Pen pen, Rectangle rect, Single startAngle, Single sweepAngle)? Another question is GDI (not GDI plus) does not provide a method to draw a chord with angles while it do provide an "AngleArc" : ( I am very bad at geometry : ( thanks http://www.freecoder.org/mt/blogs/smartkid |
|
| How can I get the width of a string in C# without Graphics (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| My problem is the following. I have developed a program with .Net, XML and XSL. There are no WinForms, all the graphics are displayed by the transformation of an XML file with XSL in HTML. Everything was working fine until yesterday. With XSL, I display informations in a table with many cells. But sometimes the text can be larger than the column width. So I tried to call from XSL a method in .Net ... |
|
| Icon wont stick (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I have specified that my main form use the App.ico that my application uses. I have repeatedly selected this icon in my forms properties, and it shows up fine in the form designer, but when I run the app I get the default 'colored boxes' icon. The icon for my .exe in windows explorer looks correct, but on my forms caption it's wrong. I've been playing around with this a while, and im afraid it's r... |
|
| Multipage Tiff Rotation Problems (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I am trying to rotate all pages of a multi page tiff. I can successfully read each page and save it to a new file using saveadd, but when I add the rotate code (image.rotateflip) it is rotating page 1 of the image even though calls 2 through X to the rotateflip method are referencing the appropriate frame of the image. Anyone else running into this issue? Thanks! |
|
| GDI+ Flat API Semi-Transparent Image Problems (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| I can get a partially transparent image to work fine with .Net (ImageAttribute ColorMatrix), but have not been able to do so with the GDI flat API for use with classic VB. I know that I might be able to roll this into a .Net dll, but would like to avoid doing that, since I have been able to get everything else I need for my classic VB apps to work with the flat API (I have my own VB6 class wrapper... |
|
| How to Draw a point? (6 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Well I feel dumb for asking this, but.. how the heck do you draw a point? I have a Graphics object and I see DrawLine, DrawEllipse, etc... but I don't see a DrawPoint. I have tried using DrawLine passing twice the same point, but it wont draw if they are identical. Any idea how I can draw a single pixel with a Graphics Object?? LOL. |
|
| Drawing a Rounded Rectanlge (2 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Is there a simple way to draw a rectangle with rounded edges in .NET using the System.Drawing class? I seem to recall that there was this ability in previous versions of MFC. Thanks, brian |
|
| .NET support for Non-client painting (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi all, We're currently developing a screen and performing a feasability research for a cursom window design to be used by their .NET applications. This window design should also run on older OS's, so themes cannot be used to do it. Therefore we have overridden the default non client painting and behaviour, using the appropriate WM NCxxx messages. All works fine as we would expect it to. We have a... |
|
| How to: Create AVI files? (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| I have an C# application that uses bitblt to perform animation. The display is fine, but I would also like to save each frame to an AVI file. Anyone know how to do this in C#? Or, and libraries out there for this? Any info would be appreciated. Thanks, Steve |
|
| what is the best way to update a large bitmap with small bitmaps? (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| hi all. i have a large bitmap that i display in my main window. as part of my app, i need to constantly update differnet areas of this bitmap with new small bitmaps. what is the best way to do this? assaf |
|
| 16 bit images (4 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi, There're some worryingly throwaway lines in the MSDN docs that 16 bit per channel images are converted to 8 bits per channel for 'processing, display and saving'. Is it the case then that it's impossible to retrieve the 16 bit pixel values at all? You can call LockBits giving it (say) the 48bppRGB format, and it certainly appears to be providing 16 bits per channel, but is this some backwards ... |
|
| How to compare colors? (2 replies) |
| microsoft.public.dotnet.framework.drawing |
| Hi. I have a label that sometimes appear in red and sometimes in blue. I need to execute an action based on the label's forecolor but I don't know if my approach is correct. The code below works: If lblSign.ForeColor.ToString "Color [Blue]" Then ... End If That is ok or is there a better approach to do this kind of comparison? Regards, Chris Leffer *** Sent via Developersdex http://www.developersd... |
|
| Images Question (3 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi , i would like to have a form/panel or some thing like that which will display the list of images on it and will implement an onclick for each image. what is the best way to do that ? Thanks T : ) |
|
| Applying color to Toolbars (8 replies, VIP) |
| microsoft.public.dotnet.framework.drawing |
| Hi I'm trying to draw an gradient on a Toolbar. I have created my own GradientToolbar, which inherrits from Toolbar. In this I try to override OnPaint in order to draw something: protected override void OnPaint(PaintEventArgs e) { Rectangle rectangle new Rectangle(0, 0, this.Width, this.Height); Color gradientColorA Color.Blue; Color gradientColorB Color.White; Brush brush new LinearGradientBrush(... |
|