You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use python-sane to access a Sane supported Scanner which uses the sane-genesys backend (from the device name), also sane-genesys man page matchs it Ambir PS665.
After init,open,start on doing snap, it fails with a MemoryError in PIL Image. On debugging it further found that basically get_parameters returns a size of (318,-1). And Because of this ysize of -1, PIL Image fails and inturn snap() fails.
As I am not much of a python expert and equally new to sane, for now I have modified sane.py snap code to check if ysize is -1 and then change it to xsize*3. But you all will have a better idea of calculating ysize, maybe using geometry info (I am assuming) or so. So please look at fixing this issue in python-sane by checking if xsize,ysize are valid or not and inturn mapping to some saner calculated value.
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to use python-sane to access a Sane supported Scanner which uses the sane-genesys backend (from the device name), also sane-genesys man page matchs it Ambir PS665.
After init,open,start on doing snap, it fails with a MemoryError in PIL Image. On debugging it further found that basically get_parameters returns a size of (318,-1). And Because of this ysize of -1, PIL Image fails and inturn snap() fails.
As I am not much of a python expert and equally new to sane, for now I have modified sane.py snap code to check if ysize is -1 and then change it to xsize*3. But you all will have a better idea of calculating ysize, maybe using geometry info (I am assuming) or so. So please look at fixing this issue in python-sane by checking if xsize,ysize are valid or not and inturn mapping to some saner calculated value.
The text was updated successfully, but these errors were encountered: