[sane-devel] scanadf not generating PNM images

sean darcy seandarcy2 at gmail.com
Mon Apr 30 17:26:04 UTC 2012


On 04/30/2012 02:12 AM, Jeffrey Ratcliffe wrote:
> On 29 April 2012 21:27, sean darcy<seandarcy2 at gmail.com>  wrote:
>> scanadf is generating images that aren't PNM. Maybe the it's generating raw?
>> Shouldn't it be generating a PNM file? Is there an option to have it
>> generate a PNM file?
>
> I think this is problem with the backend not sending enough data -
> i.e. the backend reports via params that a scan of n x m should
> appear, and therefore the frontend writes the appropriate PNM header,
> plus all the data it gets until it gets EOF, but that the x bytes that
> appear don't make up n x m.
>
> Any post processing tools than complain that the PNM is not valid.
>
> I've had to put a workaround in the development version of gscan2pdf
> to pad the end of the file with whitespace in order to get a valid
> PNM.
>
> Regards
>
> Jeff
>

I don't think that's the problem here. I looked at the scan file with a 
hex editor. All zeros. No magic number, no x or y.

sean




More information about the sane-devel mailing list