[Gdal-dev] GDAL_warp output image sizes vary.... Why?

Sampson, David dsampson at NRCan.gc.ca
Wed Dec 20 08:05:34 EST 2006


List,

Here are some of the results of tiffinfo.

Sorry about incorrect info. I meant the image starts at 16 bit and ends
off as 8 bit.

Here are the appropriate outputs

Cheers

Input file:
============
>tiffinfo A74_001.tif
TIFF Directory at offset 0x8 (8)
  Subfile Type: (0 = 0x0)
  Image Width: 6243 Image Length: 7881
  Resolution: 800, 800 pixels/inch
  Bits/Sample: 16
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 7881
  Planar Configuration: single image plane
  Page Number: 0-0

Intermediate:
==============
>tiffinfo iA74_001.tif
TIFFReadDirectory: Warning, iA74_001.tif: unknown field with tag 33922
(0x8482) encountered.
TIFFReadDirectory: Warning, iA74_001.tif: unknown field with tag 34735
(0x87af) encountered.
TIFFReadDirectory: Warning, iA74_001.tif: unknown field with tag 34737
(0x87b1) encountered.
TIFFReadDirectory: Warning, iA74_001.tif: unknown field with tag 42112
(0xa480) encountered.
TIFF Directory at offset 0x15194f8 (22123768)
  Image Width: 4182 Image Length: 5280
  Resolution: 800, 800 pixels/inch
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  Tag 33922:
12981.310000,12074.390000,0.000000,-74.002213,45.584502,0.000000,1248.85
0000,12074.390000,0.000000,-73.976008,45.594211,0.000000,1238.960000,3
41.610000,0.000000,-73.958240,45.570552,0.000000,12981.310000,341.610000
,0.000000,-73.984438,45.560847,0.000000
  Tag 34735:
1,1,0,5,1024,0,1,2,1025,0,1,1,2048,0,1,4326,2049,34737,7,0,2054,0,1,9102
  Tag 34737: WGS 84|
  Tag 42112: <GDALMetadata>
  <Item name="Area_or_Point ">Area</Item>
</GDALMetadata>

Output Final:
==============
>tiffinfo oA74_1.tif
TIFFReadDirectory: Warning, oA74_1.tif: unknown field with tag 33550
(0x830e) encountered.
TIFFReadDirectory: Warning, oA74_1.tif: unknown field with tag 33922
(0x8482) encountered.
TIFFReadDirectory: Warning, oA74_1.tif: unknown field with tag 34735
(0x87af) encountered.
TIFFReadDirectory: Warning, oA74_1.tif: unknown field with tag 34737
(0x87b1) encountered.
TIFF Directory at offset 0x1519352 (22123346)
  Image Width: 4182 Image Length: 5280
  Bits/Sample: 8
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  Tag 33550: 0.000004,0.000003,0.000000
  Tag 33922: 0.000000,0.000000,0.000000,-73.972278,45.581539,0.000000
  Tag 34735:
1,1,0,5,1024,0,1,2,1025,0,1,1,2048,0,1,4326,2049,34737,7,0,2054,0,1,9102
  Tag 34737: WGS 84|


 

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: December 20, 2006 04:55
To: Sampson, David
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] GDAL_warp output image sizes vary.... Why?

Sampson, David wrote:
> Hey folks
> 
> I am batching the georef of a bunch of images and find GREAT variances

> between input and output file sizes....
> 
> As the input file size is pretty consistent, and the same X,Y points 
> are used for GCP's in each image and the outsize option is set for 67%

> I would expect a consisent drop in file sizes.
> 
> Why is this not the case? Why do the gdal_warp images maintain their 
> appropriate file sizes?  And how can I add this condition in?
> 
> Note. Images start off as 32 bit and end off at 16bit (there is a 50% 
> drop already).
> 
> I have had cases where the output file is as large as 50 MEGS....
> 
> Why would the output file be larger than the intermediate file?
> 
> Anyone explain this?

Dave,

Can you use the FWTools Shell "tiffinfo" on one of the input files, and
one of the output files?  I suspect the input files are compressed
though there are a few other possible factors.

Best regards,
-- 
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org





More information about the Gdal-dev mailing list