Re: Re-sampling a 32 bit geotif



I tried to make a test script but it crashes when trying to read the geotif. Any ideas?

#!/usr/local/bin/perl -w
use strict;
use Image::Magick;

my($image, $x);

$image = Image::Magick->new;
$x = $image->Read('NED_52181266.tif');
warn "$x" if "$x";

my ($width, $height) = $image->Get('columns', 'rows');

print "$width,$height\n";


On Sat, Mar 7, 2009 at 3:43 AM, Jeffrey Ratcliffe <jeffrey ratcliffe gmail com> wrote:
2009/3/7 Jamie Lahowetz <deadpickle gmail com>:
> I am trying to display a geotif using Gtk2::Gdk::Pixbuf but the geotif is 32
> bits and only a 24 bit image can be read in. I want to know if there is a
> way to resample the geotif so that it can be loaded into my Perl program.

I imagine Imagemagick is your friend...

Regards

Jeff



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jrl9262 huskers unl edu


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]