resample bitmap

bwells

Well-known member
Joined
Feb 25, 2003
Messages
84
Can someone suggest a way to resample a bitmap? I want to create a bitmap where I get every other pixels data from an existing bitmap.

For instance, my original bitmap is 512x1024, and I want to create a new bitmap that is 256 x 512.
 
If you just want to resize it, then you can do so with the
DrawImage method of any Graphics class.

Create a new Bitmap class of the new size you want. Then
create a Graphics class that is set by using Graphics.FromImage,
passing the new Bitmap as a parameter to FromImage. Then
use the DrawImage metho of the Graphics object to draw the
original Bitmap onto the new one one, with a Rectangle of the
size of the new image. The DrawImage method automatically
resizes the image.
 
Can you be more specific about how the image is resized? If I want to display an image at 1/2 the original size, does this mean the Graphics DrawImage operation uses every other pixel?
 

Similar threads

C
Replies
0
Views
142
CompuTechSide
C
T
Replies
0
Views
567
This_display_name_is_already_in_use_They_all_are
T
Back
Top