Home > Back-end > According to the PixelsPerInch to set the physical size is not correct?
According to the PixelsPerInch to set the physical size is not correct?
Time:09-21
I want to let the user to specify number of cm to display an image. Small but displayed in the window, took no 4 cm The core code is as follows: Double pixelPerCM=this - & gt; PixelsPerInch/2.54;//get the pixel per cm ImageList1 - & gt; Width=m_width * pixelPerCM; ImageList1 - & gt; Height=m_height * pixelPerCM;
M_width and m_height is 4, but the screen is 4 cm can be poor
CodePudding user response:
Different display, how different pixel spacing distance or broken?
CodePudding user response:
Use GetDeviceCaps LOGPIXELSX and LOGPIXELSY conversion,