To my big suprise HorizontalResolution and VerticalResolution iof the Bitmap
class are read-only!
Is there any reason to this? And How do I change them?
Bitmap bitmap = new Bitmap(imgPhoto.Width,imgPhoto.Height,FileFormat);
bitmap.HorizontalResolution=(float)Resolution.XPixelsInInch;
bitmap.VerticalResolution=(float)Resolution.YPixelsInInch;
Thanks.
Olaf Baeyens - 31 Oct 2005 13:27 GMT
> To my big suprise HorizontalResolution and VerticalResolution iof the Bitmap
> class are read-only!
[quoted text clipped - 3 lines]
> bitmap.HorizontalResolution=(float)Resolution.XPixelsInInch;
> bitmap.VerticalResolution=(float)Resolution.YPixelsInInch;
Found it:
bitmap.SetResolution((float)Resolution.XPixelsInInch,(float)Resolution.YPixe
lsInInch);
Odd that they made those read-only.