Return-Path: <tiff-bounces@lists.maptools.org>
Received: from infbas003.isp.belgacom.be (localhost [127.0.0.1])
        by inav015.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k1L5jHrn018007
        for <joris.at.lebbeke@skynet.be>; Tue, 21 Feb 2006 06:45:17 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inas017.isp.belgacom.be (inas017.isp.belgacom.be [195.238.4.130])
        by infbas003.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k1L5jD8B006819
        for <joris.at.lebbeke@skynet.be>; Tue, 21 Feb 2006 06:45:15 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx006.isp.belgacom.be (inmx006.isp.belgacom.be [195.238.4.106])
        by inas017.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k1L5j9s3020586
        for <joris.at.lebbeke@skynet.be>; Tue, 21 Feb 2006 06:45:11 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k1L5j6r8000764
        for <joris.at.lebbeke@skynet.be>; Tue, 21 Feb 2006 06:45:06 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k1L5dq7H001165;
	Tue, 21 Feb 2006 00:40:23 -0500
Received: from hotmail.com (bay106-f4.bay106.hotmail.com [65.54.161.14])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k1L5dndD001162
	for <tiff@lists.maptools.org>; Tue, 21 Feb 2006 00:39:49 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	Mon, 20 Feb 2006 21:39:47 -0800
Message-ID: <BAY106-F4DA4EE597CA2518AFAA58E1FC0@phx.gbl>
Received: from 65.54.161.200 by by106fd.bay106.hotmail.msn.com with HTTP;
	Tue, 21 Feb 2006 05:39:44 GMT
X-Originating-IP: [66.88.101.194]
X-Originating-Email: [bumble731@msn.com]
X-Sender: bumble731@msn.com
In-Reply-To: <9e46d1bb0602201950s2892a7ecs37ba1493490736f5@mail.gmail.com>
From: "Charles Auer" <bumble731@msn.com>
To: tiff@lists.maptools.org, benarestham@gmail.com
Subject: Re: [Tiff] TIFFReadScanline query
Date: Tue, 21 Feb 2006 05:39:44 +0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 21 Feb 2006 05:39:47.0143 (UTC)
	FILETIME=[39A9A570:01C636A9]
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.0000130e
X-MSP-STORE: Tue, 21 Feb 2006 06:45:23 +0100
Status:   

Benares:

The file: http://home.pacific.net.sg/~benares/ben_sample.tif
is a Multi-Page Tiff document that contains 2 images.

The first image has width of 720 and height of 480.
The second image has width of 96 and height of 64.

Charles


>From: Benares <benarestham@gmail.com>
>To: "Chris Cox" <ccox@adobe.com>, tiff@lists.maptools.org
>Subject: Re: [Tiff] TIFFReadScanline query
>Date: Mon, 20 Feb 2006 19:50:50 -0800
>
>Hi Chris, thanks for your reply to my newbish query!
>
>I'm pretty sure the tiff file that I was trying to parse is the actual file
>and not the thumbnail file, since the thumbnail file is of a much smaller
>resolution as compared to the actual file. In addition, my output file 
>using
>the snipplet of codes I've quoted in my previous entry, had almost the same
>dimension as the original, just that this output.tif appears to be in
>columns of pure Red, Green, Blue, Black and this pattern repeats till the
>end of the image width.
>
>As for the RAW file format, I'm not too sure about it. How'd you
>categorise/deduce that the camera saves the file in RAW format ? Since,
>after playing with the camera's interface and reading on its output format
>types off the net, I'm not sure if uncompressed tiff file format equals to
>RAW. Could anybody enlighten me on this ?
>
>Do refer to the URLs below to get a clearer picture of what I meant, as 
>they
>say, a picture speaks a million words. I'm really sorry for not being able
>to phrase my question properly. Nonetheless, thanks a lot again for all the
>assistance!
>
>http://home.pacific.net.sg/~benares/ben_sample.tif <- before
>http://home.pacific.net.sg/~benares/output.tif <- after
>(p/s: maximise your browser if you've difficulty viewing the picture off 
>the
>website.)
>
>Rgds,
>benares
>
>On 2/21/06, Chris Cox <ccox@adobe.com> wrote:
> >
> > That sounds like you're getting the thumbnail image and not the full 
>size
> > image.
> > Are you sure this camera isn't saving a RAW file and you're just reading
> > the RGB thumbnail?
> >
> > Chris
> >
> >
> >
> > On 2/19/06 11:54 PM, "Benares" <benarestham@gmail.com> wrote:
> >
> > I've some difficulty parsing the tiff image information into a raster
> > array to hold these values, processing the raster data then write the
> > resulting data into another tiff image. I've tried using the
> > TIFFReadScanline function to parse these data, however my image would 
>not
> > appear as the original. I'm wondering where actually went wrong. Could
> > anybody help advise?
> >
> > My tiff file is extracted from a Kodak digital camera model DC290. The
> > default file information are as follows.
> >
> > IMAGEWIDTH: 720
> > IMAGEHEIGHT: 480
> > SAMPLESPERPIXEL: 3
> > ROWSPERSTRIP: 3
> > BITSPERSAMPLE: 8
> > PLANARCONFIG: 1 (Chunky)
> > ORIENTATION: 1 (Top-Left)
> > PHOTOMETRIC: 2 (RGB)
> >
> > ====================Reading in the image information into
> > pic_buffer================
> >     int j, k, row_counter, offset;
> >     tsize_t ScanlineSize = TIFFScanlineSize(tiffRead);
> >       //ScanlineSize = 2160 = 720*3
> >
> >     uint32* pic_buffer = (uint32*)_TIFFmalloc(sizeof(uint32) * 
>imageWidth
> > * imageHeight);
> >     uint32* line_buffer = (uint32*)_TIFFmalloc(sizeof(uint32) *
> > ScanlineSize);
> >
> >     k=0;
> >     for (row_counter=0; row_counter<imageHeight; row_counter++)
> >     {
> >         TIFFReadScanline(tiffRead , line_buffer , row_counter);
> >        for( j=0; j<ScanlineSize; j+=3 )           //reading RGB value 
>from
> > file and combining into pixel[k]
> >         {
> >            pic_buffer[k] =    ( ((((uint32)line_buffer[j]) <<8<<8
> > )&0x00FF0000)
> >                           | ((((uint32)line_buffer[j+1]) <<8 
>)&0x0000FF00)
> >                           | (((uint32)line_buffer[j+2])&0x000000FF) );
> >             k++;
> >         }
> >     }
> > ====================Reading in the image information into
> > pic_buffer================
> >
> > =====================Writing the image information into
> > output.tif=================
> >     for (row_counter=0; row_counter<imageHeight; row_counter++)
> >     {
> >         k=0;
> >         offset = row_counter*imageWidth;
> >         for (j=0; j<imageWidth; j++)
> >         {
> >            line_buffer[k] =
> > (uint32)((pic_buffer[j+offset]&0x00FF0000)>>8>>8);       //Red content
> >            line_buffer[k+1] =
> > (uint32)((pic_buffer[j+offset]&0x0000FF00)>>8);       //Green content
> >            line_buffer[k+2] = (uint32)(pic_buffer[j+offset]&0x000000FF);
> >           //Blue content
> >             k+=3;
> >         }
> >         TIFFWriteScanline(tiffWrite, line_buffer , row_counter, 0);
> >     }
> > =====================Writing the image information into
> > output.tif=================
> >
> > Thanks to all whom have read and/or made a reply to this amateurish 
>entry.
> >
> > ------------------------------
> > _______________________________________________
> > Tiff mailing list: Tiff@lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/tiff
> > http://www.remotesensing.org/libtiff/
> >
> >
> >


>_______________________________________________
>Tiff mailing list: Tiff@lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/tiff
>http://www.remotesensing.org/libtiff/


_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
