[sane-devel] sane backend static git ref e13b80fa jpeg 8 depth ok 16 depth fail

bob schmied uwppp at flash.net
Mon Jun 3 23:53:45 BST 2019


saners

platform: sparc sol10u8, gcc 4.9.0,
with jpeg
JPEG_LIB_VERSION  70	/* Version 7.0 */

using genesys_gl847 (canoscan lide 200)

per subject with depth of 8 resulting jpeg image is ok
  $   identify xom_page_c200_8_29may_nc.jpg
  xom_page_c200_8_29may_nc.jpg JPEG 1680x2160 DirectClass 8-bit 679kb 0.0u 0:01

but with depth of 16 resulting jpeg image is broken: grainy background (gray
shaded colored snow and overall image is only the upper left 1/4 of scan specified)
plus 'identify' reports it as an 8 bit depth image.

  $   identify xom_page_c200_16_29may.jpg
  xom_page_c200_16_29may.jpg JPEG 1680x2160 DirectClass 8-bit 1863kb 0.0u 0:01

this 'broken' jpeg image was created using this command:
  $   /opt/csw/src/sane-backends-master-e13b80fa/frontend/scanimage \
  --resolution=200 --mode=Color    -B51200 --format=jpeg -x8.4in -y10.8in --depth=16 \
  > /opt/csw/src/sane-backends-master-e13b80fa/xom_page_c200_16_29may.jpg

note this issue is also present in sane-backends-1.0.27.


can jpeg do 16-bit depths?

the answers seems to be no, not with 'standard' libjeg.

so should not scanimage:
  reject a jpeg format with depth 16 outright
or
  warn that jpeg format is depth 8 and force depth 8
or
  presume depth 16 is paramount and warn that the output will be depth 16 tiff
or
  some other option that i have not listed

aloha

ras





More information about the sane-devel mailing list