[ wxwindows-Bugs-1540665 ] wxBMPHandler fails to read valid bitmap
SourceForge.net
noreply at sourceforge.net
Tue Aug 15 07:50:58 PDT 2006
Bugs item #1540665, was opened at 2006-08-15 16:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1540665&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Common
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: troelsk (troelsk)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxBMPHandler fails to read valid bitmap
Initial Comment:
wxBMPHandler fails to read attachment, using samples/image.
The lines below, in imagbmp.cpp, are 'wrong' for this
image (comes to the wrong conclusion), but I'm not sure
what to do about it. I'd wish the code was using
struct's rather than this (confusing) poking into memory.
1. int width = wxINT32_SWAP_ON_BE((int)dbuf[0]);
2. int height = wxINT32_SWAP_ON_BE((int)dbuf[1]);
...
3. int bpp = wxUINT16_SWAP_ON_BE((int)aWord);
Ad. 1: Casting to short works
Ad. 2: Casting to short no good (1)
Ad. 3: Casting to short no good (0)
Using wxMSW 2.6.3 (but imagbmp.cpp seems to be
unchanged in 2.7.0).
The image is read ok with all Windows programs I've
tried, Paint, Office Picture Manager, Gimp,
http://www.xdp.it/cximage.htm etc.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1540665&group_id=9863
More information about the wx-dev
mailing list