I want to resize bitmap use old bitmap coordinate using C#
for example.
i want to get old bitmap (25,25) to (100,100) this rectangle to place
on the new bitmap
then return the new bitmap.
is it possible to do it?
Any one can help me?
thx
Crirus - 28 Dec 2003 08:23 GMT
In VB:
Dim your new bitmap
Dim nb as Bitmap=New Bitmap(100,100)
Dim g as Graphics=Graphics.FromImage(nb)
g.DrawImage(oldBitmap,new Rectangle(0,0,100,100), New Rectangle(0,0,25,25),
PixelFormat....)
Convert that in C#
> I want to resize bitmap use old bitmap coordinate using C#
> for example.
[quoted text clipped - 4 lines]
> Any one can help me?
> thx
John Hornick [MSFT] - 29 Dec 2003 02:27 GMT
Hi,
Create a new Bitmap of the desired size, wrap a Graphics around it,
and draw the original onto the new one. Then Destroy() the Graphics
and you should be all set.
Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.
> I want to resize bitmap use old bitmap coordinate using C#
> for example.
[quoted text clipped - 3 lines]
> is it possible to do it?
> Any one can help me?