# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1045636644 0 # Node ID 3c1e39905f2f09ad574d776cf0db36a888d0463f # Parent 36013ddd3f5b9eb5613893d93e966e20d92155db Use GetObject() instead of GetBitmapDimensionEx() to get the loaded bitmap size. diff -r 36013ddd3f5b -r 3c1e39905f2f win/dw.c --- a/win/dw.c Wed Feb 19 06:23:59 2003 +0000 +++ b/win/dw.c Wed Feb 19 06:37:24 2003 +0000 @@ -6698,7 +6698,6 @@ HPIXMAP pixmap; BITMAP bm; HDC hdc; - SIZE sz; char *file = malloc(strlen(filename) + 5); if (!file || !(pixmap = calloc(1,sizeof(struct _hpixmap)))) @@ -6738,9 +6737,9 @@ pixmap->hdc = CreateCompatibleDC(hdc); - GetBitmapDimensionEx(pixmap->hbm, &sz); - - pixmap->width = sz.cx; pixmap->height = sz.cy; + GetObject(pixmap->hbm, sizeof(bm), &bm); + + pixmap->width = bm.bmWidth; pixmap->height = bm.bmHeight; SelectObject(pixmap->hdc, pixmap->hbm);