Setori
Setori

Reputation: 10554

On Ghostscript: Fastest way to create a blank .tif document

A legacy backend requires the email body with a .tif document, no tif and it fails. So i need to generate a blank .tif, is there a fast way to do this with ghostscript?


edit: make once in project installation use when i need it.

Upvotes: 0

Views: 1029

Answers (3)

PhiLho
PhiLho

Reputation: 41152

The following line will produce a 1 pixel Tiff file (340 bytes). That's the smallest Tiff file I could get.

gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffpack -g1x1 -sOutputFile=small.tif -c newpath 0 0 moveto 1 1 lineto closepath stroke showpage quit

Actually, you can even reduce the command to:

gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffpack -g1x1 -sOutputFile=small.tif -c showpage quit

without size gain, alas.

Upvotes: 3

bugmagnet
bugmagnet

Reputation: 7769

Might be something here: Re: [R] Making TIFF images with rtiff

Upvotes: 0

fryguybob
fryguybob

Reputation: 4410

Couldn't you make your blank .tif file once and then attach the same file every time it is needed?

Upvotes: 0

Related Questions