   Rotating images
  hihii am testing out this code. But the problem is how come the result image is also scaled on top of the rotation? How should i change it so that the size of the input image is unchanged? private Bitmap rotateImage(Bitmap b, float angle){  //create a new empty bitmap to hold rotated image  Bitmap returnBitmap = new Bitmap(b.Width, b.Height);  //make a graphics object from the empty bitmap  Graphics g = Graphics.FromImage(returnBitmap);  //move rotation point to center of image  g.TranslateTransform((float)b.Width/2, (float)b.Height / 2);  //rotate  g.RotateTransform(angle);  //move image back  g.TranslateTransform(-(float)b.Width/2,-(float)b.Height / 2);  //draw passed in image onto graphics object  g.DrawImage(b, new Point(0, 0));   return returnBitmap;}
  Are you sure the problem is scaling, or is it that the result doesn't fit in the rectangle? Can you post sample input and output images to show us what you are getting?   ;  Somehow it happens at random.. some scales down and some up.. I really don't understands y.. this is it: Hope u can help.. Thx:)   ;  I can't see where the scaling is coming from, but I'm not familiar with C#. What The only fishy thing I see in your code is that the two translations seem to be swapped. But perhaps I'm missing something.   