Problem with

There seems to be a problem with the ConvertToBitmap function call in
the simple_wx.py demo that's provided with the Python TWAIN module. The
function produces the following error:

DIB Header: Image width > 32767 pixels for file.

Has anyone found a solution or workaround?

Thanks.

   def ProcessXFer(self, event):
     (handle, more_to_come) = self.SD.XferImageNatively()
     try:
       twain.DIBToBMFile(handle, tmpfilename)
       bmp = wx.Image(tmpfilename, wx.BITMAP_TYPE_BMP).ConvertToBitmap()
     except e:
       errmsg = 'EXCEPTION %d: %s' % (e.args[0], e.args[1])
       print errmsg
     twain.GlobalHandleFree(handle)
     self.bmpImage.SetBitmap(bmp)
     self.scrolledWindow1.maxWidth = bmp.GetWidth()
     self.scrolledWindow1.maxHeight = bmp.GetHeight()
     self.scrolledWindow1.SetScrollbars(20, 20, bmp.GetWidth()/20,
bmp.GetHeight()/20)
     self.bmpImage.Refresh()

···

--

------------------------------------------------------

Brian Wolf |
Activus Technologies Corporation |
brian@activustech.com | 410.367.2958 |

------------------------------------------------------

Helping organizations gain a competitive advantage |
through intelligent application of technology. |

------------------------------------------------------