I’ve got this code:
public void rotateRocketImage()
{
Bitmap b = this.rocketImgOriginal;
//create a new empty bitmap to hold rotated image
Bitmap tempBitmap = new Bitmap(97,97);
//make a graphics object from the empty bitmap
Graphics g = Graphics.FromImage(tempBitmap);
//move rotation point to center of image
//g.TranslateTransform(48, 48);
//rotate
//g.RotateTransform(this.orient);
//move image back
//g.TranslateTransform(-48, -48);
//draw passed in image onto graphics object
g.DrawImage(b,0,0);
this.rocketImg = tempBitmap;
}
which ( with RotateTransform currently disables ) should just make this.rocketImg equal to this.rocketImg , yet somehow it enlarges the picture almost twice… any ideas what could be causing it?
Thanks!

edit:
here’s the drawing code:
private void timer1_Tick(object sender, EventArgs e)
{
Invalidate();
}
protected override void OnPaint(PaintEventArgs e)
{
var tempRocket = new Bitmap( rocket.rocketImg );
using (var g = Graphics.FromImage(tempRocket))
{
e.Graphics.DrawImage(tempRocket, 150, 150);
}
}
There is a resolution parameter in bitmap image.
If your bitmaps have different resolutions you receive the deformation when draw one image on other.
See
HorizontalResolutionandVerticalResolutionproperties andSetResolutionmethod ofBitmapinstance.Code sample which shows how it work: