Please enable JavaScript to view this site.
This program allows for the use of Dynamic Images in your Cobwebb Design. You specify an image input path which could be on your IFS and then when the PPD is run it imports the image into the CPPD Image Library which is then used in the output. This can be useful if your images change on a regular basis. Note: IMG2CRG generates 32bit full colour images which may result in a larger image size than the input image.
Parameter |
In |
Example |
Notes |
PARM1 |
Input Image Path |
/test/image01.png |
From v0.30 this can be an SQL select statement with the image data in the first cell of the first row returned. |
PARM2 |
Output Path |
/test/output/ |
|
PARM3 |
Output File name |
image01.crg |
If this parameter is blank on input, then the input file name will be used with a “crg” extension in place of the original extension. If this parameter is not blank then any existing file will be deleted. |
PARM4 |
CPPD Image Library Entry Name |
IMAGE01 |
If this parameter is blank on input, then a unique library entry name will be generated. The first 10 characters of the input image file will be preferred. If this parameter is not blank then any existing entry will be deleted. On success, PARM4 contains the image library entry name On Failure, PARM4 will be blank |
PARM5 |
From v0.32 - The Code page to use for translating input and output variables |
If not specified, the Code page in the System Value QCHRID is used, use DSPSYSVAL QCHRID to check. It is recommended that you set this to the national Code page e.g. for the UK 285 or 1146. |
|
PARM6 |
TESTPPD,CPPD,0,2880,0,JPG,80,16,YES |
This is a list of comma separated values as follows:
Description |
Default |
Notes |
PPD Name |
blank |
This entry MUST be in UPPERCASE |
CPPD Library Name |
CPPD |
|
PPD Orientation |
0 |
0=Portrait, 90=Landscape |
Output Image Width |
2880 |
This must be specified in 1440ths of an inch. Changing this value does not change the file size of the image. If you want an image of 1 inch then you would specify 1440, for 2 inches 2880 etc. |
Output Image Rotation |
0 |
Options are (0, 90, 180, 270) rotating clockwise. |
Output Image Encoding |
JPG |
Options are (JPG, LZW). JPG uses Lossy Compression which is good for Photos, Shading, Drawings etc. This format can be selected if you wish to use a Colour image for either PDF Email or PDF File output. Note: This is the format that must be used when using PDF Datastream for colour images. LZW uses Lossless Compression which is good for Lines, Blocks etc. This format can be selected if you wish to use a Colour image for PDF Email or PDF File output. Note: This format is not compatible with PDF Datastream for colour images. Requires SPLAMATIC V2R3M0 or higher. |
Output Image JPG Quality |
80 |
Options are (0-100). Where 0 is the worst quality. The better the quality the larger the size of the image. |
Output Image Quantize Width |
16 |
Options are (0-99). The value of quantize width is a number that the output width of the image must be divisible by. For example, If you pass in an image with a width of 15 and a quantize width of 16, then the output image width will be rounded up to 16. We believe JPG image widths have to be divisible by 16, which is why we have the parameter. It defaults to 16 and is best left at that value. |
Base64 Decode SQL Data |
YES |
Options are (YES, NO). If you are using SQL in PARM1 to return the image data and the SQL is Base64 encoded then you will need to decode it to use it in IMG2CRG, so leave this option as YES. |