The patch in CVS works fine. Here is my current code to read TIFF's and
keep the original size on PDF. This code now works for dpi and pixel/cm.
$rasterImage=$pdf->image_tiff($image);
...
my $w = $rasterImage->width;
my $h = $rasterImage->height;
if ($Type eq "TIFF") {
my $xRes = $rasterImage->tiffTag('xRes') || 0;
my $yRes = $rasterImage->tiffTag('yRes') || 0;
my $resUnit = $rasterImage->tiffTag('resUnit') || 2;
if ($resUnit == 3) {
# pixel/cm
$xRes = $xRes * 2.54;
$yRes = $yRes * 2.54;
}
if ($xRes > 0 && $w > 0) {
$w = $w * 72 / $xRes;
}
if ($yRes > 0 && $h > 0) {
$h = $h * 72 / $yRes;
}
}
...
$gfx->image($rasterImage,$l,$b,$w,$h);