gdiplus: Fix errors in image dimensions.
This commit is contained in:
parent
7cbdb29884
commit
66067423d1
|
@ -45,8 +45,7 @@ static INT ipicture_pixel_height(IPicture *pic)
|
||||||
|
|
||||||
hdcref = GetDC(0);
|
hdcref = GetDC(0);
|
||||||
|
|
||||||
y = (UINT)(((REAL)y) * ((REAL)GetDeviceCaps(hdcref, LOGPIXELSY)) /
|
y = MulDiv(y, GetDeviceCaps(hdcref, LOGPIXELSY), INCH_HIMETRIC);
|
||||||
((REAL)INCH_HIMETRIC));
|
|
||||||
ReleaseDC(0, hdcref);
|
ReleaseDC(0, hdcref);
|
||||||
|
|
||||||
return y;
|
return y;
|
||||||
|
@ -61,8 +60,7 @@ static INT ipicture_pixel_width(IPicture *pic)
|
||||||
|
|
||||||
hdcref = GetDC(0);
|
hdcref = GetDC(0);
|
||||||
|
|
||||||
x = (UINT)(((REAL)x) * ((REAL)GetDeviceCaps(hdcref, LOGPIXELSX)) /
|
x = MulDiv(x, GetDeviceCaps(hdcref, LOGPIXELSX), INCH_HIMETRIC);
|
||||||
((REAL)INCH_HIMETRIC));
|
|
||||||
|
|
||||||
ReleaseDC(0, hdcref);
|
ReleaseDC(0, hdcref);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue