Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>primeragif()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PrimeraGIF()

Prints a GIF image file on a Primera 76000/76001 Thermal Color printer


Syntax

PrimeraGIF(<cFILE.GIF>, <cDevStr>, <nLeft>, <nTop>, ;
           <nNewWidth>, <nNewHeight>, ;
           <nBrightness>, <nHeatSetting>, [<nOptions>])


Arguments

<cFILE.GIF>
Name of the GIF image file, and optional drive and path.

<cDevStr>
Output device string: "lpt<n>", "com<n>", "prn", "file:<FILE>".

<nLeft>
Left offset into the page in inches.

<nTop>
Top offset into the page in inches.

<nNewWidth>
New print width in inches.

<nNewHeight>
New print height in inches.

<nBrightness>
Change brightness value between -255 dark to 255 light. Suggested value 30.

<nHeatSetting>
Set heat setting. Acceptable values range from 1 (coldest) to 96 (hottest)). 
Suggested value 25.

<nOptions>
FORMFEED, FASTFLAG.


Returns

0
Success.

-1
Cannot open <cFILE.GIF>.

-2
Cannot allocate memory for line buffers.

-3
This is not a GIF file.

-4
Print terminated by user.

-5
Printer does not acknowledge.

-6
Printer is out of paper.

-7
Printer timeout error.

-8
Cannot print an interlaced GIF file.

-9
<cDevStr> must be "lpt<n>", "com<n>", "prn", "file:<FILE>".

-10
Write Error: Disk Full.

-11
<nLeft> plus <nNewWidth> must be less than 8.5".

-12
<nTop> plus <nNewHeight> must be less than 11.5".

-13
<nBrightness> should be between -255 and 255.

-14
<nHeatSetting> should be between 1 (cold) and 96 (hot).

-99
Parameters are invalid.


Remarks

PrimeraGIF() prints a Compuserve GIF image on a Fargo Primera 76000/76001 
Thermal Color Printer. FORMFEED disabling and FASTFLAG are optional. You 
must set brightness, port, or file.

PrimeraGIF() has the capability of printing images larger than screen sizes 
to 2550x3300 pixels.

The printer requires RGB temp files for quantizing, thus sufficient hard 
disk space is required. Use Sunshow rotation functions for image rotation.

The image will be quantized on your computer in 3 to 5 minutes, with a 
typical total print time of about 9 minutes. Printing with the FASTFLAG 
option is recommended.

The FASTFLAG option writes directly to printer ports, and supports LPT 
ports only. It does not support COM ports, PRN, FILE, and is not network 
redirectable. Therefore, it cannot be used with a network prionter. The 
FASTFLAG option is compatible with a non-networked local printer at your 
current workstation.

Network use of PrimeraGIF() requires network print services, which are 
redirected BIOS print functions. Therefore, <cDevStr> must be "LPTn", 
"COMn", or "PRN" or "file:cFILENAME.PRN" If you choose to print to 
cFILENAME.PRN, you must send the binary PRN file to your remote printer 
(networked printer) with network print services.

A two step method is also available. By printing to a file, SendBIN can be 
used to print the file. Actual print time using SendBIN will almost as fast 
as the FASTFLAG option.

Maximum Printable Image Sizes

Paper Size     Max Color        Max Monochrome

A-Size         8.5" x 9.3"      8.5" x 9.8"

A-Long         8.5" x 11.0"     8.5" x 11.5"

A4             210mm x 254mm    210mm x 266mm

A4-Long        210mm x 292mm    210mm x 297mm


Performance

Raster image processing (RIP) is performed by the PC and the Sunshow 
driver, therefore faster PCs with more memory will provide significant 
performance increases. Fargo recommends at least a 386 CPU with 2 MB of 
memory. A 486 with 4 MB of memory is recommended for best results.


Heat Settings

The default heat setting of 25 should be fine for color and monochrome 
graphic printing on most papers. The printer heat control is used by 
Fargo to adjust image intensity. However, Sunshow uses a brightness 
algorithm in the software, and this has a wider range of intensity and 
does not affect ink adhesion or quality. We recommend that you reserve the 
heat setting on the printer for special paper situations where paper 
texture, tooth, or coating cause poor ink adhesion due to insufficient 
heat, or too much heat darkens the image by burning the ink.


Paper

We recommend always using the manufacturers' recommended paper type, and 
paper (synthetic or wood-pulp) specially coated for thermal printers. 
Specially coated papers with a very smooth finish produce the best 
presentation quality. Many papers are coated on two sides. In addition to 
a front coating for ink adherance and image quality, there may  be an 
anti-static coating on the back. We do not recommend plain paper. It may be 
too abrasive for thermal printers. Beware of synthetic paper, as well. 
Some synthetic papers are too slippery, cannot feed correctly, and have 
ink adherance problems.


Example

To print ASMUSSEN.GIF 4.0" x 3.0" at 360 dpi with a left margin of 1.75 
inches, a top margin of 3.5 inches, and in the approximate center of the 
page:

cFILENAME = "ASMUSSEN.GIF"
nStatus = PrimeraGIF(cFILENAME, "lpt1", 1.75, 3.5, 4, 3, ;
                     30, 25, FASTFLAG + FORMFEED)
IF nStatus < 0
    DO CASE
    CASE nStatus = -1
        ? "Cannot open", cFILENAME
    CASE nStatus = -2
        ? "Cannot allocate memory for line buffers"
    CASE nStatus = -3
        ? cFILENAME, " is not a CompuServe GIF file"
    CASE nStatus = -4
        ? "Print terminated by user"
    CASE nStatus = -5
        ? "Printer does not acknowledge"
    CASE nStatus = -6
        ? "Printer is out of paper"
    CASE nStatus = -7
        ? "Printer timeout error"
    CASE nStatus = -8
        ? "Cannot print an interlaced GIF file"
    CASE nStatus = -9
        ? "cDevStr must be lpt<N>, com<N>, " + ;
           "prn, file:<FILENAME>"
    CASE nStatus = -10
        ? "Write error: Disk Full"
    CASE nStatus = -11
        ? "nLeft plus nNewWidth must be less than 8.5"
    CASE nStatus = -12
        ? "nTop plus nNewHeight must be less than 11.5"
    CASE nStatus = -13
        ? "nBrightness should be between -255 and 255"
    CASE nStatus = -14
        ? "nHeatSetting should be between 1 (cold)" + ;
          " and 96 (hot)"
    CASE nStatus = -99
        ? "Parameters are invalid"
    ENDCASE
ENDIF



See Also: PrimeraPCX() PrimeraSCR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson