Drawing bitmap?
-
Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the
DrawImage
function ofGraphics
. Setting theSmoothingMode
property of theGraphics
object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the
DrawImage
function ofGraphics
. Setting theSmoothingMode
property of theGraphics
object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)Have you tried following?
Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor;
M Aamir Maniar aamirOnline.com
-
Hello! I'm trying to draw an existing image onto a bitmap. The problem is that I need to scale the image and it is automatically smoothed, but I don't want it smoothed. I use the
DrawImage
function ofGraphics
. Setting theSmoothingMode
property of theGraphics
object seems to have no effect. Any idea how I can draw an image non-smoothed and scaled onto a bitmap? Best regards Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)You want InterpolationMode not SmoothingMode. NearestNeighbour will not do any smoothing.
-
Have you tried following?
Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor;
M Aamir Maniar aamirOnline.com
That works, thanks a lot!
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
You want InterpolationMode not SmoothingMode. NearestNeighbour will not do any smoothing.
That works, thanks a lot!
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT)