Menu

#650 TDib does not handle correctly some bitmaps

6.44
open
GUI (79)
1
9 hours ago
13 hours ago
No

According to the documentation of BITMAPINFOHEADER, for uncompressed RGB bitmaps the member biSizeImage can be set to 0. But TDib does not handle correctly such bitmaps when they are loaded from a resource. Subsequently, when trying to use such bitmap in a toolbar, only garbage is dsiaplyed.

The problem may be in the ResToMemHandle method, where the bitmap is copied, and the memory size is calculated using that member - and if it is 0, then the bitmap may not be copied correctly.

Related

Feature Requests: #213

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 9 hours ago

    This issue has been fixed on the trunk [r8858], and the fix has been merged into Owlet [r8859].

     

    Related

    Commit: [r8858]
    Commit: [r8859]

  • Vidar Hasfjord

    Vidar Hasfjord - 9 hours ago
    • labels: --> GUI
     

Log in to post a comment.