[sane-devel] scanimage fails to scan 16 bit gray image from epson 2450

rob mailingLists at pangolin.org.uk
Wed Jul 24 23:25:30 BST 2002


On Wed, 2002-07-24 at 20:40, Henning Meier-Geinitz wrote:
> Hi,
> 
> On Wed, Jul 24, 2002 at 04:20:58PM +0100, rob wrote:
> > I'm trying to scan 16 bit gray images using scanimage with my epson 2450
> > but all I get out of it is a a page of snow with the hint of a pattern
> > in it.
> > 
> > This is my command line:
> > 
> >  scanimage -d epson:/dev/usbscanner0 --focus-position 'Focus 2.5mm above
> > glass' --source 'Transparency Unit' --film-type 'Negative Film'
> > --brightness 0 -x 26mm -y 38mm -l 7mm -t 40.5mm --resolution 300 --mode
> > Gray --depth 16 --format tiff > bw07.tiff
> 
> Good spot.
> 
> For everyone who don't have a scanner that can do 16 bit gray, here is
> an example for the test backend:
> 
> scanimage -d test --mode Gray --depth 16 --test-picture "Color patterns"  --format tiff >test.tiff
> 
> I think the fix is simple: Edit frontend/stiff.c, change the line
>      add_ifd_entry (ifd, 258, IFDE_TYP_SHORT, 1, 8);
> 
> to
>      
>      add_ifd_entry (ifd, 258, IFDE_TYP_SHORT, 1, depth);
>      
> Bits per sample were set to 8 which will cause trouble in 16 bit mode.
> 
> Please test everyone, I don't know more about Tiffs than their name :-)

Hi, this seems to fix it:)
I can now open the tiff with gimp 1.3 and convert it to png with
convert. Eye of Gnome failed on it but this is probably a bug in it as
everything else worked.

However the pnm format also fails. Nothing can open the file. Converting
it to png fails but converting to jpeg works fine. (again xsane can
create them properly).
 
> Bye,
>   Henning
> _______________________________________________
> Sane-devel mailing list
> Sane-devel at www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel
> 
-- 

rob




More information about the sane-devel mailing list