Return-Path: <tiff-admin@remotesensing.org>
Received: from jay.skynet.be (jay.skynet.be [195.238.3.234])
        by twentyeight.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i03NMnjR021831
        for <joris.at.lebbeke@skynet.be>; Sun, 4 Jan 2004 00:22:49 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by jay.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i03NLlxr001979
        for <joris.at.lebbeke@skynet.be>; Sun, 4 Jan 2004 00:21:50 +0100
        (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 i03NIfl07070;
	Sat, 3 Jan 2004 18:18:41 -0500
Received: from ERC.MsState.Edu (root@Sniper.ERC.MsState.Edu [130.18.14.12])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i03NHhl07049
	for <tiff@remotesensing.org>; Sat, 3 Jan 2004 18:17:43 -0500
Received: from pushkarpc (Pushkar-pc.ERC.MsState.Edu [130.18.13.50]); 
          by ERC.MsState.Edu (8.12.10/8.12.6/ERC-Mailhost/1.13) with SMTP; 
          id i03NHf0K024377 for <tiff@remotesensing.org>; 
          Sat, 3 Jan 2004 17:17:41 -0600 (CST)
From: "Pushkar Pradhan" <pushkar@GRI.MsState.Edu>
To: "Tiff@Remotesensing.Org" <tiff@remotesensing.org>
Message-ID: <MJEBIBGMCDKIGEHPDECCEEBACGAA.pushkar@erc.msstate.edu>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Subject: [Tiff] Resampled TIFF doesn't open in viewer
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: Sat, 3 Jan 2004 17:17:41 -0600
X-UIDL: 0f0c09bab70bba54bea4fc16721ba201
Status: U

Hi,
I resample a TIFF image (striped, 8 bits/sample, separate image planes, 1
band, width: 621, height : 577, rows/strip 13) by a factor of 2 using
Nearest Neighbor method. Thus image width and height increase by 2.
Moreover, I make the o/p format IEEE FP.
However, my viewer is unable to open the image (reports it's own errors). I
correctly set the rows/strip tag to 26 as it is 13 in the input image. I
don't think I have to worry about stripbytecounts and stripoffsets as they
cannot be set. But do I need to read these tags from the input image and use
it somehow?
Below I've pasted some information that may help in debugging.

This is the information reported by tiffinfo and tiffdump for the i/p image:
TIFF Directory at offset 0x577b6
  Image Width: 621 Image Length: 577
  Resolution: 1, 1 (unitless)
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 13
  Planar Configuration: separate image planes
  Software: IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.9.2.2 $ $Date: 2002/01/14 13:57:53EST $

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 358326 (0x577b6) next 0 (0)
ImageWidth (256) SHORT (3) 1<621>
ImageLength (257) SHORT (3) 1<577>
BitsPerSample (258) SHORT (3) 1<8>
Compression (259) SHORT (3) 1<1>
Photometric (262) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 45<8 8081 16154 24227 32300 40373 48446 56519
64592 72665 80738 88811 96884 104957 113030 121103 129176 137249 145322
153395 161468 169541 177614 185687 ...>
Orientation (274) SHORT (3) 1<1>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<13>
StripByteCounts (279) LONG (4) 45<8073 8073 8073 8073 8073 8073 8073 8073
8073 8073 8073 8073 8073 8073 8073 8073 8073 8073 8073 8073 8073 8073 8073
8073 ...>
XResolution (282) RATIONAL (5) 1<1>
YResolution (283) RATIONAL (5) 1<1>
PlanarConfig (284) SHORT (3) 1<2>
ResolutionUnit (296) SHORT (3) 1<1>
Software (305) ASCII (2) 154<IMAGINE TIFF Support\nCop ...>
SampleFormat (339) SHORT (3) 1<1>

This is the information reported by tiffinfo and tiffdump for the o/p image:
TIFF Directory at offset 0x76424
  Image Width: 1242 Image Length: 1154
  Bits/Sample: 32
  Sample Format: IEEE floating point
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 26
  Planar Configuration: separate image planes

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 484388 (0x76424) next 0 (0)
ImageWidth (256) SHORT (3) 1<1242>
ImageLength (257) SHORT (3) 1<1154>
BitsPerSample (258) SHORT (3) 1<32>
Compression (259) SHORT (3) 1<1>
Photometric (262) SHORT (3) 1<1>
StripOffsets (273) LONG (4) 45<8 32300 64592 96884 129176 161468 193760
226052 258344 290636 322928 355220 387512 419804 452096 0 0 0 0 0 0 0 0 0
...>
SamplesPerPixel (277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<26>
StripByteCounts (279) LONG (4) 45<32292 32292 32292 32292 32292 32292 32292
32292 32292 32292 32292 32292 32292 32292 32292 0 0 0 0 0 0 0 0 0 ...>
PlanarConfig (284) SHORT (3) 1<2>
SampleFormat (339) SHORT (3) 1<3>

Pushkar

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