<cfx_kmGraphic> cfx_kmSuite
Programming Reference

cfx_kmGraphic contains functions for the manipulation of graphic files.

Help
ImageSize
Resize
Version


F=ImageSize

Description
Return the height and width of a GIF or JPG graphic file.
Returns
The image dimensions in the specified format.

The dimensions are also stored in the following variables:
   kmImageHeight - Height of the graphic, in pixels.
   kmImageWidth - Width of the graphic, in pixels.
Syntax
  <cfx_kmGraphic  F=ImageSize  V=variable  SHOW
      FILE=file-pathname
      FORMAT=output-format >
Attribute   Description         Required?
FILE  Pathname of an existing JPG or GIF.  YES
FORMAT  Output format for the image information. Default=HTML.
The following format values are supported:
  • HTML Format suitable for the HTML <IMG> tag, e.g. "HEIGHT=100 WIDTH=150"
  • LIST The values are formatted as a comma-delimited list. Height is the first element,wdith is the second. For example, "100,150"
 no


F=Resize

Resize a GIF or JPG graphic file.

Returns
Yes=Operation went OK.
No=There was a problem.
Syntax
  <cfx_kmGraphic  F=Resize  V=variable  SHOW
      IN_FILE=file-pathname
      OUT_FILE=file-pathname
      STRETCH=percentage
      HEIGHT=pixels
      WIDTH=pixels
      QUALITY=number >
Attribute   Description         Required?
IN_FILE  Pathname of the existing JPG or GIF input file.  YES
OUT_FILE  Pathname of the desired output JPG or GIF output file.  YES
STRETCH  Proportionate stretch percentage. (1% to 10000%) The original image proportions are maintained.

Less than 100% means make the image smaller. (e.g. 50% results in half-size images.)

More than 100% means make the image larger. (e.g. 200% results in double size images.)

The percent sign is optional.
This parameter will over-ride any HEIGHT/WIDTH specifications.
 no
HEIGHT  Desired height for the new output file, in pixels.
If no HEIGHT or STRETCH values are given, the original image height is maintained.
 no
WIDTH  Desired width for the new output file, in pixels.
If no WIDTH or STRETCH values are given, the original image width is maintained.
 no
QUALITY  Quality value (1-100) for JPG output. Lower quality means smaller files but uglier pictures. Higher quality means nicer pictures but larger files. Default QUALITY is 75.

For GIF output, this attribute has no effect.
 no