[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1234567[8]910 ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 06:25:38 04/06/01 Fri
Author: Michel
Subject: Re: hylafax tiff images - wrong file height
In reply to: Timo Meier 's message, "Re: hylafax tiff images - wrong file height" on 10:49:17 04/05/01 Thu

Hi Timo,

The following transform class handles low resolution fax images:

Best regards,


{ Transform to expand low resolution Tiff fax files }
unit LowResFax;


EnDiGrph, { for TDibGraphic }
EnTransf; { for TImageTransform }


{ faxes can be transmitted in "low resolution" mode, where every second
horizontal line is skipped. The transform restores a low resolution
fax image. }
TLowResFaxTransform = class(TImageTransform)
procedure ApplyOnDest( const Source : TDibGraphic;
const Dest : TDibGraphic ); override;



EnMisc; { for DoProgress }

procedure TLowResFaxTransform.ApplyOnDest(
const Source : TDibGraphic;
const Dest : TDibGraphic );
LineNo : Integer;
DestLineNo : Integer;
FLastPercent := -1;
FLastPercent := DoProgress(Self, FOnProgress, 0, 0, 100, FLastPercent);

Dest.NewImage( Source.Width, Source.Height * 2, Source.ImageFormat,
Source.PalettePtr, Source.XDotsPerInch, Source.YDotsPerInch );

LineNo := 0;

while LineNo < (Source.Height-1) do
DestLineNo := LineNo * 2;

Move( Source.ScanLine[LineNo]^, Dest.ScanLine[DestLineNo]^, Source.ScanLineSize );
Move( Source.ScanLine[LineNo]^, Dest.ScanLine[DestLineNo + 1]^, Source.ScanLineSize );


FLastPercent := DoProgress(Self, FOnProgress, LineNo, 0, Source.Height-1, FLastPercent);

FLastPercent := DoProgress(Self, FOnProgress, 100, 0, 100, FLastPercent);



>Paint Shop Pro has the same problem.
>Could you please mail me the program?
>>Hi Sven,
>>Is the image compressed at half its height? Some fax
>>images are low resolution and skip every second
>>horizontal line. I have created a transform to restore
>>those images. Check the XDotsPerInch/YDotsPerInch
>>property after loading the tiff file. You may email me
>>the file and I will check if this is the situation.
>>Best regards,
>>>We use the latest envision lib (which we even
>>>We detected the following error: When loading .tif
>>>files created by hylafax, we often get the wrong
>>>height - so the image looks streched.
>>>This happens with about 80% of all .tif files we
>>>after resizing the file by hand to the right size, it
>>>looks correct again!
>>>email me to get an example .tif file, so you can test
>>>btw: the faster you fix this error, the better -
>>>we are working on a REALLY good hylafax client
>>>(database driven / multi user / multi line / inbox
>>>rules / outlook look'n'feel) and the tif viewer is an
>>>important component for that of course !

[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.