comctl32: Fix bitmap size calculation

Aleksey Bragin aleksey at
Thu Mar 26 14:38:34 CDT 2009

Fix bitmap size calculation in IMAGELIST_InternalExpandBitmaps and  
remove unneded parameter. Memory requirements are greatly reduced  
after this fix.

The bug was an ambiguous meaning of a cx parameter, which was  
supposed to be a width of an individual image inside the list, but  
width of a whole bitmap was passed in thus making memory requirements  
huge (number of images * width of whole bitmap = required bitmap size).
Furthermore, cx parameter is redundant because all checks are already  
there (that the image list can't be reduced), and besides of that  
there is no use for it anymore. Thus it's been removed.

With the best regards,
Aleksey Bragin.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-comctl32-Fix-bitmap-size-calculation-in-IMAGELIST_InternalExpandBitmaps-and-remove-unneded-parameter.-Memory-requirements-are-greatly-reduced-after-this.txt
URL: <>

More information about the wine-patches mailing list