Map Snapshot throws Access Violation Exception

Description

If the current video color depth is less than 32 bpp, an Access Violation exception is thrown when attempting to capture a Snapshot image of the map.

Environment

None

Activity

Show:
Jerry Faust
September 7, 2017, 10:27 PM

CImageClass:CBitsToImageBufferWithPadding() required two changes. First, the calculation of bytesPerPixel was incorrect, which was causing the exception. Secondarily, the height specified in the BITMAPINFO struct had to be negated in order to invert the image (top-to-bottom).

Done

Assignee

Jerry Faust

Reporter

Jerry Faust

Labels

None

Fix versions

Priority

Medium