gdi+ Questions

0

I'm trying to visualize on memory GDI+ images using the Image Watch extension. I requested support on this feature long time ago directly on the developercommunity it got a lot of upvotes but MSFT ...
Swill asked 18/9, 2024 at 7:12

7

Solved

I'm trying to remove all white or transparent pixels from an image, leaving the actual image (cropped). I've tried a few solutions, but none seem to work. Any suggestions or am I going to spend the...
Tenebrific asked 17/7, 2010 at 11:51

3

Solved

I am developing a label designing program and I have encountered a very weird issue that I cannot find an answer to anywhere on the internet. The basic explanation is that when the layoutRectangle ...
Kinase asked 12/4, 2024 at 9:26

4

I am trying to draw some text using TextRenderer (since this is favorable to using Graphics.DrawString) to a Bitmap, however it is having some very undesirable effects. Example Code using (Bitmap...
Generalization asked 16/9, 2013 at 22:1

3

Solved

I use the following code to draw line: Graphics g = this.CreateGraphics(); Pen p = new Pen(Color.Black,3); g.DrawLine(p,...); // ... Why the straight line is zigzag kind of, not straight and smo...
Centralia asked 6/4, 2011 at 15:46

40

Solved

This seems to be a bit of an infamous error all over the web. So much so that I have been unable to find an answer to my problem as my scenario doesn't fit. An exception gets thrown when I save the...
Febrifuge asked 27/6, 2009 at 15:40

4

Solved

How is Graphics.Save different from Graphics.BeginContainer?
Headlock asked 24/8, 2009 at 6:5

6

I've been searching and testing different kinds of rendering libraries for C# days for many weeks now. So far I haven't found a single library that works well on multi-windowed rendering setups. Th...
Marj asked 3/11, 2012 at 21:25

10

If you use Image.Save Method to save an image to a EMF/WMF, you get an exception (http://msdn.microsoft.com/en-us/library/ktx83wah.aspx) Is there another way to save the image to an EMF/WMF? Are t...
Cornered asked 30/9, 2008 at 11:59

5

Solved

I need to save an image after opening it in from an OFD. This is my code atm: Dim ofd As New OpenFileDialog ofd.Multiselect = True ofd.ShowDialog() For Each File In ofd.FileNames Image.FromFile...
Mirellamirelle asked 12/1, 2010 at 17:36

4

Solved

Recently I came across a .NET color chart based on their hue and brightness value. What stroke me is the crazy grayscale chart. For example, DarkGray is actually lighter then Gray ? Also, I can't s...
Gherlein asked 10/1, 2011 at 19:27

3

Solved

I am doing some image scaling using GDI+ (C#), and have noticed a problem where the image I am scaling is being cut off along the left and top edges. http://zctut.com/cutoff.png To reproduce this...
Halette asked 19/12, 2010 at 6:51

3

Solved

I unable to use GDI+ 1.1 classes in my VS2012 MFC C++ project (on Win7). Classes Image, Bitmap, Graphics works just fine but when I try to declare an object of Blur class (or other v1.1 classes) I ...
Approximate asked 25/11, 2014 at 12:32

5

Solved

I'm currently working on a game and I wish to have a main menu with background image. However, I find the method Graphics.DrawImage() really slow. I have made some measurement. Let's assume that M...
Photomural asked 13/6, 2012 at 18:3

7

Solved

I would like to darken an existing color for use in a gradient brush. Could somebody tell me how to do this please? C#, .net 2.0, GDI+
Apostolic asked 10/4, 2009 at 10:8

4

Solved

Is there an easy way to blend two System.Drawing.Color values? Or do I have to write my own method to take in two colors and combine them? If I do, how might one go about that?
Squatness asked 15/9, 2010 at 22:22

1

Solved

I am trying to overlay an image on top of my screen with GDI+ and C++. I have successfully drawn an image to a non-transparent window, but I only want the background of my window to be transparent,...
Sailing asked 20/12, 2022 at 3:35

5

I'm finding a way to use GDI+ library with g++ compiler, I have read some guildlines on the web and still meet with problem... Here is my code: #include "gdiplus.h" using namespace Gdiplus; // S...
Kizzie asked 3/3, 2012 at 1:27

5

Solved

I am trying to teach myself C# and have heard from a variety of sources that the functions get and setpixel can be horribly slow. What are some of the alternatives and is the performance improvemen...
Orchestrate asked 11/7, 2014 at 15:49

2

Solved

I have the following code, that draws a line with a (very) small arrow... private void Form1_Paint(object sender, PaintEventArgs e) { Pen p = new Pen(Color.Black); p.EndCap = System.Drawing.Drawi...
Televise asked 2/8, 2010 at 21:2

11

Solved

Having a code that works for ages when loading and storing images, I discovered that I have one single image that breaks this code: const string i1Path = @"c:\my\i1.jpg"; const string i2P...
Conscious asked 22/3, 2013 at 13:2

3

Solved

I am fairly new to C# GDI+ graphics. I want to draw an image over another, which should be centered horizontally and vertically in a fixed height and width container on an image. I tried to do this...
Condensation asked 20/2, 2015 at 15:26

2

The problem I am capturing a screenshot from an obstructed window on Windows 11 OS using windll.user32.PrintWindow (which in turn is calling WM_PRINT according to the docs). Everything works as exp...
Cicala asked 18/9, 2022 at 22:29

8

Solved

I got the value to show up correctly using: [DefaultValue ( typeof ( Color ), "255, 0, 0" )] public Color LineColor { get { return lineColor; } set { lineColor = value; Invalidate ( ); } } ...
Cucumber asked 5/10, 2009 at 20:27

10

Solved

I'm stuck trying to turn on a single pixel on a Windows Form. graphics.DrawLine(Pens.Black, 50, 50, 51, 50); // draws two pixels graphics.DrawLine(Pens.Black, 50, 50, 50, 50); // draws no pixels ...
Biquadratic asked 17/4, 2009 at 15:57

© 2022 - 2025 — McMap. All rights reserved.