- 159 名前:デフォルトの名無しさん mailto:sage [2016/02/14(日) 01:40:03.55 ID:1d8zURsn.net]
- Bitmapをただ保存して読み込むだけでdpiが変わってしまうのですが、
ライブラリのバグですか? pngとbmpでも結果が違うし private void Form1_Load(object sender, EventArgs e) { Bitmap bmp1 = new Bitmap(16, 16); bmp1.Save("test.png"); bmp1.Save("test.bmp", System.Drawing.Imaging.ImageFormat.Bmp); Trace.WriteLine(string.Format("H:{0}, V:{1}", bmp1.HorizontalResolution, bmp1.VerticalResolution)); Bitmap bmp2 = new Bitmap("test.png"); Trace.WriteLine(string.Format("H:{0}, V:{1}", bmp2.HorizontalResolution, bmp2.VerticalResolution)); Bitmap bmp3 = new Bitmap("test.bmp"); Trace.WriteLine(string.Format("H:{0}, V:{1}", bmp3.HorizontalResolution, bmp3.VerticalResolution)); } H:96, V:96 H:95.9866, V:95.9866 H:96.01199, V:96.01199
|

|