anthony wrote:Sorry, that I am not going to wade through. I said a small example, as in a small image with the simplified command for testing.
Ha ha. Anthony, that was just an example from my system to show that you CAN quite easily add text to TIF files. I'm not the person who asked for help.
Ok, so it wasn't so simple. And getting all the settings to maintain a TIF file is quite hard as I didn't understand what the settings all meant myself.
Step by step breakdown of one of these beasts.
The command to execute
The file to work open and work upon
Code: Select all
"Y:\CCC\received\2007\11\30\2007-11-30__07-16__Page-0001__9KFC9A.jpg"
Make the file 1728 pixels wide, rescaling as appropriate and maintain aspect ratio
Set the border colour to black
Set the fill colour to black
Add a border of 100 pixel to the Y axis - don't add a border to the X axis.
Draw a header in the new border area - This draws a date and time in the top left of the new border, a page number in the top right and a special code in the middle.
It uses the Consolas font to help differentiate 1/I/l O/0.
Code: Select all
-draw "fill white stroke black stroke-width 1 rectangle 0,0 1727,99 fill black rectangle 0,0 339,99 rectangle 1420,0 1727,99 fill black font Consolas font-size 60 stroke white stroke-width 4 text 5,44 '2007/11/30' text 88,94 '07:16' font-size 140 text 1422,94 '0001' fill white font-size 110 stroke black text 550,76 '9 K F C 9 A'"
Rotate the entire page.
Draw another "header", but this is now the "footer" due to the rotation.
Code: Select all
-draw "fill white stroke black stroke-width 1 rectangle 0,0 1727,99 fill black rectangle 0,0 339,99 rectangle 1420,0 1727,99 fill black font Consolas font-size 60 stroke white stroke-width 4 text 5,44 '2007/11/30' text 88,94 '07:16' font-size 140 text 1422,94 '0001' fill white font-size 110 stroke black text 550,76 '9 K F C 9 A'"
Rotate the page pack to where it should be.
Faxes need to have a specific density.
Absolutely no idea but was necessary.
Again, no idea but had an effect on filesize.
Finally output the file, which in this case, is back to the original file.
Code: Select all
"Y:\CCC\received\2007\11\30\2007-11-30__07-16__Page-0001__9KFC9A.jpg"
Basically, this adds a border to the top and the bottom of a fax. The bottom border is rotated so that it is readable whichever way up the actual fax is read.
I've just done a quick check and this year alone, this code has worked on over 23,000 faxes (TIFF) and scans (JPG with a slightly different script).