#!/usr/bin/perl


use Geo::GDAL;
use Geo::GDAL::Const;




@datag = (235,235,235,231,229,235,244,248,246,244,242,239,235,233,231,231,229,229,231,235,233,227,223,227,229,225,219,221,227,229,227,223,219,221,223,231,233,229,225,227,231,231,231,231,231,231,229,229,229,227,227,231,231,231,231,233,235,235,235,235,235,235,235,235,235,233,233,231,231,231,231,229,227,229,231,231,229,225,223,223,223,225,223,223,225,223,221,221,223,227);


$outr = pack ("c[90]",@datag);

$gtiff_driver = Geo::GDAL::GetDriverByName('GTiff');
$output_ds= $gtiff_driver->Create("tmp.tif", 9, 10, 1, $Geo::GDAL::Const::GDT_Byte);

$r = $output_ds->GetRasterBand(1);

$r->WriteRaster(0,0,9,10,$outr);

$output_ds->FlushCache;

# Uncomment the following and the file band is written. Leave it in and the tiff is blank

#undef $output_ds;



