DrawImage colors too dark.

aewarnick

Senior Contributor
Joined
Jan 29, 2003
When I draw an image the color is not the same as the original. Is there any way to fix that?
e.Graphics.DrawImage(Im, rect);
 

aewarnick

Senior Contributor
Joined
Jan 29, 2003
I found that if I use DrawImageUnscaled I get perfect quality.
Now, the question is,

How can I use DrawImage and get the same image quality?

Even when I include:
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
in my paint event, the quality is better but not near as good as Unscaled.
 
Last edited:

Spiggers

Newcomer
Joined
Jan 24, 2012
Hi, I am finding this problem also. I need to resize but I cannot work out how to stop colours going darker. I suspect something related to colormatrices and the imageattributes collection.

Did you get an answer?
 

snarfblam

Ultimate Contributor
Joined
Jun 10, 2003
Location
USA
SleepingTroll, this is GDI+, not DirectX.

It's impossible to diagnose a problem like this with a one-line description. If you post the image you are trying to draw and/or the code that is doing the drawing, it'll help.

I'm not aware of any situation that would cause the colors to change unless you are specifically passing a ColorMatrix to do so, but certain types of graphics may appear darker or degraded with slight scaling.
 

JibstaMan

Newcomer
Joined
Feb 15, 2012
I think I had the same problem.
I used an ImageList, but somehow the images in the list were darker then they should have been.
I've removed the images and added them again, which solved the problem for me.
Not sure how I added the images in the first place... been a while.
 
Top Bottom