Return-Path: <tiff-admin@remotesensing.org>
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.3.89])
        by six.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i34GWYN6012805
        for <joris.at.lebbeke@skynet.be>; Sun, 4 Apr 2004 18:32:34 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by inmx007.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i34GWUkf006853
        for <joris.at.lebbeke@skynet.be>; Sun, 4 Apr 2004 18:32:31 +0200
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i34GUSl15812;
	Sun, 4 Apr 2004 12:30:28 -0400
Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i32E9Gl21453
	for <tiff@remotesensing.org>; Fri, 2 Apr 2004 09:09:16 -0500
Received: from comcast.net (pcp260153pcs.howard01.md.comcast.net[68.55.148.215])
          by comcast.net (sccrmhc11) with SMTP
          id <2004040214090901100c2mege>
          (Authid: WendelDRenner);
          Fri, 2 Apr 2004 14:09:09 +0000
Message-ID: <406D732B.5000001@comcast.net>
From: Wendel Dean Renner <WendelDRenner@comcast.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: tiff@remotesensing.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [Tiff] 16 bit gray scale images and tiff
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Fri, 02 Apr 2004 09:05:31 -0500
X-UIDL: 6feeeec76f5a74c31c12407df18e63db

The TIFF 6.0 Specification, on page 22, says "Allowable values for 
Baseline TIFF grayscale images are 4 and 8, allowing either 16 or 256 
distinct shades of gray."   Maybe the problem here is the word 
"Baseline".  I don't know what that means.   Where in that document is 
16 bits per sample allowed?

In any event I posted a message last week because I could not understand 
how film scanners could be writing 16 bit gray scale images in TIFF 
format (for x-ray film which is black and white), or how I could read 
those images.

I want to thank the two people who replied to me.  To read a 16 bit gray 
scale I was told to call
TIFFReadScanline in the TIFF library, and that works.   For each pixel 
the first byte was the most significant byte.

Do I assume that all images are of this byte order?  In the 
GraphicMagick stuff I downloaded I found a call to MSBOrderShort that 
has something to do with byte order, but I don't know what that function 
does, nor could I find it in either GraphicMagick (but it must be there 
somewhere) or in the tiff library.

Another question, is there such a thing as an RGB image with 16 bits per 
sample (and so 3 samples per pixel)?  What happens when a 14 bit scanner 
writes out a color image?   Are they truncated to 8 bits per color?
I notice in the TIFF library that TIFFGetR, TIFFGetB and TIFFGetG assume 
RGB is 3 bytes, blue the most significant byte, and so byte order is 
also assumed besides the size of each sample.

Lastly, I have a 16 bit TIFF gray scale image file written by Adobe 
PhotoShop that someone sent me, that TIFFOpen bombs on every time (I 
mean the program crashes upon calling TIFFOpen passing in the file name 
as an argument).   Yet the image displays OK if I use some other image 
viewing software.  But I have yet another 16 bit gray scale image from 
PhotoShop.that gets past TIFFOpen and I can read and display the 
image.   I am using a Windows libtiff that I down loaded (I can't 
remember if it was from your site or someplace else). (I also run under 
Linux and have not tried it there yet.)

I do not receive the list as I am not a member so I would apperciate any 
response be copied to my email address
wendeldrenner@comcast.net.  I have written an application where I have 
to be able to read TIFF encoded images.
It would be nice in my opinion if the film scanner people would also 
write to PNG format.


_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
