[sane-devel] Basic Image Buffering
dio.rahman at gmail.com
dio.rahman at gmail.com
Tue Feb 3 00:43:18 UTC 2009
Dear all,
I have a basic question on buffering the image.
Suppose I have an image data pointer * imageData; and I have image
dimension information i.e. width and height.
I need to copy the bytes read from the scanning process i.e. in the
buffer (sane_read(buffer,buffer_size,&len)) to the image data.
So, I do:
for(int i=0;i<len;i++)
*(imageData++) = buffer[i]
until I found the SANE_STATUS_EOF
but, when I showed the image, the pixel is not in the right order;
Anyone can help me?
Thanks
Dio
NOTE: I'm using CanonScan LiDE 50 -- grayscale image; and doing find
with the scanimage example
More information about the sane-devel
mailing list