Module: wine Branch: master Commit: 2c1d555a08647cf69dcde1621d04b1fa0b2ba629 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2c1d555a08647cf69dcde1621d...
Author: Vincent Povirk vincent@codeweavers.com Date: Mon Aug 24 14:03:28 2009 -0500
windowscodecs: Fix rounding in BMP encoder.
---
dlls/windowscodecs/bmpencode.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index a545103..11c39e8 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -333,8 +333,8 @@ static HRESULT WINAPI BmpFrameEncode_Commit(IWICBitmapFrameEncode *iface) bih.bV5BitCount = This->format->bpp; bih.bV5Compression = This->format->compression; bih.bV5SizeImage = This->stride*This->height; - bih.bV5XPelsPerMeter = (This->xres-0.0127) / 0.0254; - bih.bV5YPelsPerMeter = (This->yres-0.0127) / 0.0254; + bih.bV5XPelsPerMeter = (This->xres+0.0127) / 0.0254; + bih.bV5YPelsPerMeter = (This->yres+0.0127) / 0.0254; bih.bV5ClrUsed = 0; bih.bV5ClrImportant = 0;