i have a control that i am drawing to a bitmap. The problem that i am having is scaling the bitmap to a certain size. No matter what i have tried, after the control is drawn to the bitmap i cannot scale it down. When i view the bitmap in paint or window picture/fax viewer it isn't scaled, it is the original control drawn to bitmap size.
the factor variable is about .75 and is calculated in another method.
i have also tried the Graphics.DrawImage with the destination rectangle equally what it would be if the .75 scaling was applied in the scaletransform. the drawimage does scale it down but it draws over the original control.drawtobitmap so i have both and the bitmap is still the same height.
Control s = (Control)control;
Bitmap bmp = new Bitmap((Image)new Bitmap(1, 1), control.Size);
s.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
Graphics g = Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
bmp.Save(path + "myBitmap.Bmp", ImageFormat.Bmp);