HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] fax tiff to png/jpg/gif conversion
> Does anyone know of a program or a command line argument for convert
that
will generate an image that looks the same as the orginal tiff file? I don't
mind some resolution loss as they will just be for previewing and not
printing.
I wonder, why nobody uses tiff2ps and gs for this task, as they are
already installed with hylafax.
excerpt from my faxrcvd:
---- somewhere before mail-creation ------
PAGES="`$INFO -n $FILE | grep Pages | awk -F": " '{print $2}'`"
PREVIEWPAGES=1
if [ "$PAGES" -lt "$PREVIEWPAGES" ]; then PREVIEWPAGES=$PAGES; fi
#### create png-file from tiffg3 for preview
$TIFF2PS -a -O $FILE.ps $FILE > /dev/null 2>&1
$GSRIP -q -dBATCH -dNOPAUSE -dSAFER -r98 -sDEVICE=pngmono
-sOutputFile=$COMMID%d.png $FILE.ps > /dev/null 2>&1
--- during mail-creation
## attach preview in PNG-format
for ((page=1;page<=$PREVIEWPAGES;page++)); do
echo "--$MIMEBOUNDARY"
echo "Content-Type: image/png"
echo "Content-Description: FAX Preview"
echo "Content-Transfer-Encoding: $ENCODING"
echo "Content-Disposition: attachment;
filename=\"preview$page.png\""
echo ""
$MIMENCODE $COMMID$page.png 2>/dev/null
done
# set the final MIME-boundary
echo "--$MIMEBOUNDARY--"
) | 2>&1 $SENDMAIL -ffax -oi "$SENDTO"
fi
else
#
# Generate notification mail for a failed attempt.
#
--- at the end cleanup
if [ -f $FILE.ps ]; then rm -f $FILE.ps; fi
rm -f $COMMID*.png
--
holger
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*