HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Possible bug in fax2ps? Re: tiff height/width swap? | problem with tiff images



This posting addresses possible bug in fax2ps. I noticed two posting with
the subjects:

1)  tiff height/width swap?
2)  progblem with tiff images

Which seem to also address this problem.

The originators of these messages are included in the Cc list.

The problem(s) addressed in these postings basically state that either the
orientation of an incoming to postscript converted fax seems to be wrong or
the aspect ration is wrong. I've come accross the same problem and I think
I've narrowed down the "problem".

Details of the tiff file are appended to the end of this message. When
viewing this file with xv it shows the complete page but it looks squashed
in the vertical direction. The same results when viewing with ImageMagick's
display command. Frank D. Cringle's viewfax displays the file correctly. The
squashedness exhibited when viewing with xv or display is due to different
vertical and horizontal resolution of the fax/tiff pixels. So actually this
is not really a problem but just a fact of life ;)

When converting the incoming tiff, faxrcvd uses the fax2ps program. In this
case (my case) it does not quite convert the image correctly. The pixel
aspect-ration is obviously taken into account (correctly) but somehow the
page orientation is messed up. I've not determined why this is the case but
after looking at the postscript output, I've concluded that the co"ordinates
of the bounding box should be swapped. After editing the postscript file and
swapping the bounding box co"ordinates the output looks fine. One minor
problem is that the top part of the fax is displayed. This can be remedied
through specifying the actuall (correct) size of the output medium, which in
my case is an ISO A4 page.

fax2ps -S -W 8.26 -H 11.69 /var/spool/fax/recvq/fax00002.tif > fax.ps 

Produces a fax.ps file with correct aspect and page size but stil has an
incorrect bounding box with indicates a landscape rather than a portrait
page.

I'ce decided to edit faxrcvd and put tiff2ps in place if fax2ps. Testing by
hand indicates this produces correct output. There's even no need to specify
the desired height and width of the output page. Alternatively one could
write a small awk script that swaps the postscript bounding co"ordinates to
reflect the correct page orientation. (I may want to do this as a small
awk exercise)

Hopefully this will help or indicate a possible bug in fax2ps.

regards,

Jan Rhebergen

PS: here's some version info and the tiff info. By the way I'm not
subscribed to the mailing lists.

bash> dpkg -l | grep hylafax
ii  hylafax-client  4.0.2-8        HylaFAX client software
ii  hylafax-doc     4.0.2-8        HylaFAX Documentation
ii  hylafax-server  4.0.2-8        HylaFAX server software
ii  tkhylafax       3.2-1          tk interface to hylafax 

bash> dpkg -l | grep tiff
ii  libtiff-tools   3.4beta037-5.1 tiff manipulation and conversion tools
ii  libtiff3g       3.4beta037-5.1 tiff runtime library [libc6] 

bash> tiffinfo /var/spool/fax/recvq/fax00002.tif
TIFF Directory at offset 0xb0e4
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 1728 Image Length: 1115
  Resolution: 204, 98 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 3
  Photometric Interpretation: min-is-white
  FillOrder: lsb-to-msb
  Date & Time: "2000:03:07 13:25:37"
  Host Computer: "uniques"
  Software: "HylaFAX (tm) Version 4.0pl2"
  Image Description: "+31 703740653"
  Make: "USROBOTICS SPORTSTER V.34+ FAX"
  Model: ""
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 151
  Planar Configuration: single image plane
  Group 3 Options: (0 = 0x0)
  Fax Data: clean (0 = 0x0)
  Fax Receive Parameters: 00002106
  Fax Receive Time: 42 secs 




Project hosted by iFAX Solutions