what data type is imageData? why not memcpy instead? allan
On Mon, Feb 2, 2009 at 7:43 PM, <dio.rahman at gmail.com> wrote: > 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 > > -- > sane-devel mailing list: sane-devel at lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/sane-devel > Unsubscribe: Send mail with subject "unsubscribe your_password" > to sane-devel-request at lists.alioth.debian.org > -- "The truth is an offense, but not a sin"