Re: image data format polarity

From: Ingo Wilken (Ingo.Wilken@Informatik.Uni-Oldenburg.DE)
Date: Mon Sep 11 2000 - 00:37:03 PDT

  • Next message: Nick Lamb: "Re: image data format polarity"

    > [David Paschal]
    > > On the other hand, for 1-bit depths (lineart, halftone), 0 means
    > > white and 1 means black. Is there any particular reason for this,
    > > especially since xsane and xscanimage both end up having to invert
    > > it anyway in order to display a preview?
    > This sounds like a bug to me. The only partly sensible reason I can
    > make up on the fly to use a encoding like this is to make sure black
    > writing on white paper give mostly 0 bits.

    That's not a bug, it's the PBM image format, see pbm(5):

    # It was originally designed to make it reasonable to mail
    # bitmaps between different types of machines using the typical stupid
    # network mailers we have today.
    [...]
    # - Width * height bits, each either '1' or '0', starting at the top-left
    # corner of the bitmap, proceeding in normal English reading order.
    #
    # - The character '1' means black, '0' means white.

    And yes, it obviously was designed that way, so a human can see the
    image without using a graphics display program, just by looking at
    the ASCII representation (assuming a large screen and proper formatting,
    the manpage has a tiny example).

    Regards,
    Ingo

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Mon Sep 11 2000 - 00:32:35 PDT