I think I will be no more in that number. it really seems too complicated to be sure of an exact measure in mm. It seems pixel are always accurate so I'll use pixels only.
As always I must confess I make a lot of confusion with this matter and discovered about EDID today from your post. It seems EDID data in windows is concealed in the registry under HKLM\SYSTEM\CurrentControlSet\\Enum\DISPLAY\"name of your monitor"\Device Parameters\EDID key.
The output is very verbose and glancing it I dont find any physical measure resembling those of my monitor: I read in the wikipedia article you linked, measures in centimeters are stored in bytes 21-22, but under which names in the following output? Again: my monitor is 48cm x 27cm
$VAR1 = {
'video_input_definition' => {
'separate_sync' => 0,
'sync_on_green' => 1,
'digital' => 0,
'voltage_level' => 0,
'composite_sync' => 1
},
'EISA_ID' => 'QRF4646',
'max_size_vertical' => 48,
'extension_flag' => 48,
'max_size_horizontal' => 66,
'ratio_name' => '4/3',
'edid_version' => 48,
'checksum' => 50,
'gamma' => 56,
'ratio' => '1.375',
'year' => 2039,
'feature_support' => {
'DPMS_standby' => 0,
'has_preferred_timing' => 0,
'DPMS_suspend' => 0,
'DPMS_active_off' => 1,
'sRGB_compliance' => 1,
'GTF_compliance' => 1,
'rgb' => 1
},
'max_size_precision' => 'cm',
'diagonal_size' => '32.1294578946507',
'established_timings' => [
{
'vfreq' => 60,
'X' => 640,
'Y' => '480'
},
{
'vfreq' => 67,
'X' => 640,
'Y' => '480'
},
{
'Y' => '480',
'X' => 640,
'vfreq' => 75
},
{
'X' => 832,
'Y' => '624',
'vfreq' => '75'
},
{
'X' => 1024,
'Y' => '768',
'interlace' => 1,
'vfreq' => '87'
}
],
'serial_number' => 808470086,
'week' => 52,
'product_code' => 17990,
'detailed_timings' => [
{
'horizontal_active' => 821,
'vertical_dpi' => '44.185416666666
+7',
'vertical_image_size' => 1328,
'stereo' => 2,
'interlaced' => 0,
'horizontal_dpi' => '31.5960606060
+606',
'vertical_sync_pulse_width' => 32,
'vertical_sync_offset' => 19,
'pixel_clock' => '131.21',
'vertical_sync_positive' => 1,
'vertical_blanking' => 2361,
'bad_ratio' => 1,
'ModeLine' => '"821x835" 131.21 82
+1 1127 1181 1897 835 854 886 3196 +hsync +vsync',
'horizontal_sync_pulse_width' => 5
+4,
'horizontal_blanking' => 1076,
'vertical_active' => 835,
'ModeLine_comment' => '# Monitor s
+upported modeline (21.6 Hz vsync, 69.2 kHz hsync, ratio 0.98, 31x44 d
+pi)',
'digital_composite' => 0,
'vertical_border' => 66,
'horizontal_image_size' => 821,
'horizontal_sync_positive' => 1,
'horizontal_border' => 52,
'horizontal_sync_offset' => 306
},
{
'vertical_blanking' => 48,
'vertical_sync_positive' => 0,
'vertical_active' => 819,
'horizontal_blanking' => 560,
'horizontal_sync_pulse_width' => 8
+17,
'ModeLine' => '"1080x819" 179.89 1
+080 1136 1953 1640 819 822 830 867 +hsync -vsync',
'vertical_border' => 57,
'digital_composite' => 2,
'ModeLine_comment' => '# Monitor s
+upported modeline (126.5 Hz vsync, 109.7 kHz hsync, ratio 1.32, 41 dp
+i)',
'horizontal_sync_offset' => 56,
'horizontal_sync_positive' => 1,
'horizontal_border' => 70,
'horizontal_image_size' => 824,
'stereo' => 1,
'vertical_image_size' => 2097,
'vertical_dpi' => '43.33875',
'horizontal_active' => 1080,
'horizontal_dpi' => '41.5636363636
+364',
'interlaced' => 0,
'vertical_sync_offset' => 3,
'vertical_sync_pulse_width' => 8,
'pixel_clock' => '179.89'
},
{
'pixel_clock' => '123.36',
'vertical_sync_offset' => 3,
'vertical_sync_pulse_width' => 0,
'horizontal_dpi' => '2.19363636363
+636',
'interlaced' => 0,
'vertical_image_size' => 304,
'stereo' => 1,
'vertical_dpi' => '56.726666666666
+7',
'horizontal_active' => 57,
'horizontal_sync_offset' => 57,
'horizontal_sync_positive' => 0,
'horizontal_border' => 48,
'horizontal_image_size' => 817,
'vertical_border' => 49,
'digital_composite' => 2,
'ModeLine_comment' => '# Monitor s
+upported modeline (33.0 Hz vsync, 46.2 kHz hsync, ratio 0.05, 2x56 dp
+i)',
'horizontal_blanking' => 2613,
'vertical_active' => 1072,
'horizontal_sync_pulse_width' => 8
+20,
'ModeLine' => '"57x1072" 123.36 57
+ 114 934 2670 1072 1075 1075 1398 -hsync -vsync',
'bad_ratio' => 1,
'vertical_blanking' => 326,
'vertical_sync_positive' => 0
},
{
'interlaced' => 0,
'horizontal_dpi' => '41.9869696969
+697',
'horizontal_active' => 1091,
'vertical_dpi' => '57.202916666666
+7',
'vertical_image_size' => 1329,
'stereo' => 1,
'pixel_clock' => '141.29',
'vertical_sync_pulse_width' => 16,
'vertical_sync_offset' => 3,
'ModeLine' => '"1091x1081" 141.29
+1091 1139 1961 2421 1081 1084 1100 1385 -hsync +vsync',
'horizontal_sync_pulse_width' => 8
+22,
'horizontal_blanking' => 1330,
'vertical_active' => 1081,
'vertical_sync_positive' => 1,
'vertical_blanking' => 304,
'bad_ratio' => 1,
'horizontal_image_size' => 1089,
'horizontal_border' => 52,
'horizontal_sync_positive' => 0,
'horizontal_sync_offset' => 48,
'ModeLine_comment' => '# Monitor s
+upported modeline (42.1 Hz vsync, 58.4 kHz hsync, ratio 1.01, 41x57 d
+pi)',
'digital_composite' => 2,
'vertical_border' => 48
}
],
'standard_timings' => [
{
'vfreq' => 111,
'X' => 632,
'Y' => '395',
'ratio' => '16/10'
},
{
'ratio' => '16/10',
'Y' => '435',
'X' => 696,
'vfreq' => 108
},
{
'vfreq' => 66,
'ratio' => '4/3',
'Y' => '486',
'X' => 648
},
{
'X' => 640,
'Y' => '480',
'ratio' => '4/3',
'vfreq' => 64
},
{
'Y' => '430',
'ratio' => '16/10',
'X' => 688,
'vfreq' => 116
},
{
'vfreq' => 65,
'Y' => '600',
'ratio' => '4/3',
'X' => 800
},
{
'X' => 800,
'ratio' => '4/3',
'Y' => '600',
'vfreq' => 65
},
{
'vfreq' => 113,
'X' => 704,
'ratio' => '16/10',
'Y' => '440'
}
],
'ratio_precision' => 'cm',
'monitor_details' => '',
'edid_revision' => 67,
'manufacturer_name' => 'QRF'
};
If I understand you correctly I must figure which is the real current dpi value, modify the scaling accordingly and re-calculate the size in mm. Right?
While this matter is interesting and thanking you for hints and time you spent on it, I'm considering to remove entirely the mm calculation from my application, leaving pixel as only option.