Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sane-genesys scanner ysize=-1leads to PIL MemoryError #1052

Closed
hanishkvc opened this issue Dec 19, 2014 · 1 comment
Closed

sane-genesys scanner ysize=-1leads to PIL MemoryError #1052

hanishkvc opened this issue Dec 19, 2014 · 1 comment

Comments

@hanishkvc
Copy link

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.

@wiredfool
Copy link
Member

Moved to Sane repo: python-pillow/Sane#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants