[sane-devel] hp3970 - Reading image in raw format

Frank Zago sane at zago.net
Mon Oct 10 09:10:24 UTC 2005


JKD wrote:

>Hello everyone,
>
>I started working on hp scanjet 3970 backend one year ago unofficially
>(I don't like to make things official when I'm not sure if I can do it).
>Few months later I stopped working on it due to other guy announced
>officially his intention to create a backend. After some months of
>inactivity I'm on it again.
>
>My program already makes scanner working and it seems that image is
>being read from scanner but I need some help about it. I need to see if
>received image is correct but I don't know anything about known image
>formats. Scanner's image is a succesion of 3 bytes (red, green, blue
>channels). Is there any utility to see this kind of image? Is there any
>utility or any code to convert this data to any known image format?
>  
>
If the image is already in the shape of a RGB triplet, you can simply 
add a PPM header and display the image with 'display'.
If not, you can write a short filter (about 20 lines of code) to create 
a PPM from it. See 'man ppm' and 'man pnm'.

Frank.



More information about the sane-devel mailing list