Input and output

gif2afp can process either standard input, or multiple files specified on the command line. If no input file is specified, stdin is assumed. Only a single GIF file should be submitted using stdin. If multiple GIF files are concatenated using standard input, all except the first one are ignored.

If an input file is specified on the command line, it can be either a GIF file, a directory, or a file list (-f and @ prefixes). Multiple input file specifications are allowed. The transform processes each file in the order in which it was specified on the command line. If the -z option is specified, a list of file names to be processed is also submitted using standard input. The files on the list are processed as if the list were given using the -f option on the same place on the command line as -z.

If the file name points to a directory, gif2afp processes every file in that directory. The files are processed in the order they would be shown using the ls -a command. Directory search is not recursive, that is, subdirectories are not searched.

If the file name is preceded by the -f option or the at sign (@), gif2afp assumes that the file contains the list of GIF files to be processed. Each of the files in the list is processed in the order it was listed.

If a GIF file has the extension .gif or .GIF, this extension need not be given explicitly. gif2afp first tries to open the file as specified, and if unsuccessful, tries to append the extensions .gif and .GIF in turn.

For example, suppose that:

  • The directory tFiles contains the files file1.gif, file2.gif, file3.gif, and file4.gif and nothing else.
  • The file flist in the current directory contains the two file names tFiles/file2.gif and tFiles/file3.gif. The names listed in the file list can have their extensions omitted.
  • The file flist2 contains the file name tFiles/file4. Again, the names listed in the file list can have their extensions omitted.

To process files file1.gif, file2.gif, file3.gif, and file4.gif, any of these invocations of gif2afp would work:

gif2afp tFiles/file1.gif tFiles/file2.gif tFiles/file3.gif 
														  tFiles/file4.gif
gif2afp tFiles/file1 tFiles/file2 tFiles/file3 tFiles/file4
gif2afp tFiles/file*.gif
gif2afp tFiles
gif2afp tFiles/file1 -fflist tFiles/file4
gif2afp tFiles/file1 -f flist tFiles/file4
gif2afp tFiles/file1 -f flist -f flist2
gif2afp tFiles/file1 @flist @flist2
Note: With InfoPrint Manager for Windows, you can enter separators in path names as backward slashes or forward slashes.

The file list files allow the display text to be added for each file. A display text is any text starting with the pound character (#) and extending to the end of the line. The display text should follow the file name, and can extend over several lines, up to 2048 characters long. The initial # character on each line is discarded. If a display text is present for a file name, that text is displayed in the status and error messages instead of the file name. This is useful if the gif2afp is invoked using temporary files whose names are meaningless to the user. Any display text before the first file name is treated as comment and discarded. Display text is allowed also if you use the -z option to submit the file list using standard input.

GIF files can contain multiple images. The gif2afp transform can process and output all the images in the file, subject to the values given in the -p option.

The output file name can be either specified explicitly using the -o option, or derived from the input file name. If multiple input files have been specified, the default output file is standard output. If a single input file is given and the output file is not specified explicitly, the transform strips the .gif or .gif extension from the input file name (if one is present), and appends the .afp extension for AFP output, or the .ps extension for PostScript output, to get the output file name.

To disable automatic output file name generation and force the default output stream to be the standard output in all cases, set the environment variable GIF2AFP_o to - or stdout, or alternatively, put the line o=- or o=stdout into the configuration file and invoke that configuration file using the -C option or the GIF2AFP_C environment variable.

For example, all these commands:

gif2afp myfile
gif2afp myfile.gif
gif2afp myfile -o myfile.afp
have myfile.afp as the output file. There is no requirement for the explicitly specified input and output files to have .gif and .afp extensions. To process GIF file foo.bar into an AFP file foo.bar2, invoke the transform using:
gif2afp foo.bar -o foo.bar2

The output data stream is MODCA-P IS/1, MODCAP-P IS/2, or PostScript Level 2. IS/1 images are bi-level and are encoded as IOCA Function Set 10 or IM1. IM1 images are uncompressed. IOCA FS10 output images can be either uncompressed, or compressed using one of the four available compression algorithms (see the -cmp option). The default is ITU-T T.6 Group 4 compression. IM1 images are always uncompressed. IS/2 images can be either bi-level, 4-bit or 8-bit grayscale, or 24 bit YCbCr color. Multibit images are encoded as IOCA Function Set 11.

PostScript Level 2 images can be uncompressed or ITU-T T.6 Group 4 bi-level, uncompressed 8-bit grayscale or uncompressed 24-bit RGB color. By default, the transform leaves scaling and halftoning to the printer (that is, color GIF images are output as 24-bit RGB color images).