use Geo::GDAL; $file = shift @ARGV; $dataset = Geo::GDAL::Open($file); die "can't open $file as a raster dataset" unless $dataset; ($minx, $dx, undef, $maxy, undef, $dy) = $dataset->GeoTransform(); ($width, $height) = $dataset->Size; $band = $dataset->GetRasterBand(1); $data = $band->ReadTile; print @$data == $height ? "ok\n" : "not ok\n";