AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



2009.01.16 15:54 "Tiff2ps centering and imagemask operator option", by Richard Nolde

2. tiff2ps option -c (Joerg Schlueter)
Joerg,
   I believe that you are correct in saying that the centering code is 
not working. I have been working on a patch that provides rotations of 
90, 180, and 270 degrees plus an "auto" mode in which the image will be 
rotated to best fit the size specified with -h and -w and I can confirm 
your problem.  I am testing my patch with the center option as well and 
will upload the final version to bugzilla when I have finished testing.

  In testing my new code, (based on libtiff-3.9 CVS tree), I discovered 
that the -m option to use the "imagemask" operator produces invalid 
Postscript on some Tiff files generated by Adobe Photoshop 7.0 (The only 
version to which I have access.)  Without the "imagemask" Postscript 
operator, eg using the default of "image" instead, the files seem to be 
correctly read by both Photoshop and Ghostscript. With the -m flag, 
Photoshop errors out with "the parser module cannot parse the file" and 
Ghostscript 8.63 on Fedora 8 blows up with:

gs -q  -sDEVICE=bbox -dNOPAUSE -dNOPROMPT -dBATCH Widetest-map-centered.ps
Error: /typecheck in --imagemask--
Operand stack:
   3200   1000   1   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   
--nostringval--   --nostringval--   false   1   %stopped_push   1905   
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3   
%oparray_pop   1771   1   3   %oparray_pop   --nostringval--   
%errorexec_pop   .runexec2   --nostringval--   --nostringval--   
--nostringval--   2   %stopped_push   --nostringval--   1810   5   4   
%oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1147/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--   
--dict:1/100(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 517
GPL Ghostscript 8.63: Unrecoverable error, exit code 1

Richard Nolde
> Message: 2
> Date: Tue, 13 Jan 2009 17:38:44 +0100
> From: "Joerg Schlueter" <joerg29@gmail.com>
> Subject: [Tiff] tiff2ps option -c
> To: tiff@lists.maptools.org
> Message-ID:
> 	<947639ed0901130838l73806151rac0253ecabb0d786@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> I'm using tiff2ps as described at
> http://www.firstpr.com.au/sys-admin/TIFF-to-PDF
> and wanted to center small images:
>
> tiff2ps -c -w5.51 -h7.76 *.tif | ps2pdf13 -sPAPERSIZE=a4 - > documents.pdf
>
> seems that the -c option has no effect, the images are located at the
> bottom of the page, aligned left. I have Mepis7 with preinstalled
> libtiff (don't know which version this would be), but also tested
> using v4.00 beta2, same result
>
> is there another way to center the images both horizontal and vertical?
>
> thanks in advance, kind regards
> Joerg
>