2010.01.29 13:10 "Re: [Tiff] tiff2ps, rotation", by Hans Werner Strube

2010.01.29 17:29 "[Tiff] Rotation in tiff2ps", by Richard Nolde

> From: Hans Werner Strube<strube@physik3.gwdg.de>

The option -r of tiff2ps does not work properly, both in tiff 3.8.2 and 3.9.2.

In 3.8.2, this only shows up with Option -p and PS-Level>1. This results in an inconsistent PS file, causing a bus error with ghostscript. I found a strange switch between x and y related quantities (lines 604 and 610), as if there were a 90 or 270 degrees rotation instead of the actual 180 degrees; but fixing only this did not remove the inconsistency.

In 3.9.2, rotation by 180 degrees seems to be o.k., but with 90 and 270 degrees the page shape is not rotated, only the content is, which is then deformed to match the page shape. This might be due to the fact that p[s]x and p[s]y are switched both in calling PSHead() and again within PSHead(). But simply changing this is insufficient, because the aspect ratio of the content remains wrong.

I made some mods to tiff2ps to add rotations of 90 and 270 degrees some years ago but the original patches were lost. I thought that they had been applied to the current 3.9.2 and 4.* CVS trees. In 3.8.2 and earlier releases, there was an issue with the -m flag to use the imagemask operator with Level1 postscript because the implementation used in tiff2ps required at least level2 support and there was no check that -m was being used with at least Level2.

I'd be happy to send you my version if you would like to work with it and see what you come up with.

Richard Nolde

Tiffcrop Author