Ignore:
Timestamp:
Aug 5, 1999, 1:44:35 PM (26 years ago)
Author:
sandervl
Message:

Bitmap conversion bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winres.cpp

    r386 r419  
    1 /* $Id: winres.cpp,v 1.5 1999-07-24 14:14:06 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.6 1999-08-05 11:44:35 sandervl Exp $ */
    22
    33/*
     
    297297  }
    298298
    299   // EB: ->>> added imgsize
    300   if(bmphdr->bmp2.cbImage == 0)
    301     imgsize =  CalcBitmapSize(bmphdr->bmp2.cBitCount,
    302                               bmphdr->bmp2.cx,
    303                               bmphdr->bmp2.cy);
    304   else
    305     imgsize = bmphdr->bmp2.cbImage;
     299  //SvL: Always recalculate bitmap size (donut.exe has wrong size)
     300  imgsize =  CalcBitmapSize(bmphdr->bmp2.cBitCount,
     301                            bmphdr->bmp2.cx,
     302                            bmphdr->bmp2.cy);
    306303
    307304  winbmphdr = (WINBITMAPINFOHEADER *)malloc(sizeof(WINBITMAPINFOHEADER) +
     
    316313  //TODO: Identical except for BI_BITFIELDS (3L) type!
    317314  winbmphdr->biCompression   = bmphdr->bmp2.ulCompression;
    318   winbmphdr->biSizeImage     = bmphdr->bmp2.cbImage; //imgsize;
     315  winbmphdr->biSizeImage     = imgsize;
    319316  //TODO: Doesn't seem to be completely identical..
    320317  winbmphdr->biClrUsed       = bmphdr->bmp2.cclrUsed;
Note: See TracChangeset for help on using the changeset viewer.