resolution in the Bitmap and wxBitmapDataObject

Greetings!

I am building an extension to an OCR library that can accept a Windows DIBitmap from the clipboard. It requires that the resolution in the info header be set. Currently passing wxBitmap via wxBitmapDataObject to the wxClipboard works for most clipboard sinks. (e.g. Gimp and Windows's Paint).

However, the OCR library requires that "XPelsPerMeter" and "YPelsPerMeter" members of the BITMAPINFOHEADER be set and fails because the wxBitmapDataObject apparently has them set to zero.

Does anyone know how to access the header in the wxBitmapDataObject?

Dana Hackman wrote:

Greetings!

I am building an extension to an OCR library that can accept a
Windows DIBitmap from the clipboard. It requires that the resolution
in the info header be set. Currently passing wxBitmap via
wxBitmapDataObject to the wxClipboard works for most clipboard sinks.
(e.g. Gimp and Windows's Paint).

However, the OCR library requires that "XPelsPerMeter" and
"YPelsPerMeter" members of the BITMAPINFOHEADER be set and fails
because the wxBitmapDataObject apparently has them set to zero.

Does anyone know how to access the header in the wxBitmapDataObject?

There isn't anything in wxPython for it, and I'm not aware of anything in the wxWidgets API either. It probably needs to have some changes done in the internals of wxBitmap.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!