CIB image toolbox technical manual
5. Properties details
5.7. PageSelection
Property-Name |
Data type |
Type |
PageSelection |
String |
Set |
Property for page selection. With this property you can describe, which page/pages should be processed.
If this property is not set or no parameters are passed, there is no conversion process and the logfile contains ‘Conversion isn't required: PageSelection isn't defined.’
Must only be positive values, otherwise conversion
will fail with error.
‘Conversion
parameter array is invalid or empty.’
Syntax
PageSelection={“PageRange”:”<start>[-<end>]”,”MaxWidth”: number, ” MaxHeight”: number, “MaxResolutionX”: number, “MaxResolutionY”: number, “ColorSpace”: string, “ColorDepth”: number, “Encoding”: string, [[“CompressionLevel”:number][, “Quality”:number] [, “Border”: { “Width”: number, “Color”: string}][, “SpecialPageRange”: {“PageRange”:”<start>[-<end>]”, ”MaxWidth”: number, ”MaxHeight”: number, …}][, “ImageToolboxParams”: { “AlgorithmSetPath”: string, “AlgorithmName”: string, “ProfilePath”: string]}] [, “…”:…]]};...
Example
Example #1:
PageSelection={ "PageRange" :"1", "Encoding" : "PNG", };{"PageRange" : "2", "Encoding" : "JPEG",};{ "PageRange" : "1-10", "Encoding" : "JPEG",
"MaxWidth" : "150" }
Example #2:
{ "PageRange" :"1-3", "Encoding" : "TIFF","ColorSpace" : "sRGB", "ColorDepth" :"8", "MultiPageOutput" : true,
"ImageToolboxParams" : { "AlgorithmSetPath" :"c:/Software/CIB/_IPL_problems/2016_11_29/AlgorithmsSet_sample.xml","AlgorithmName" : "Flip", "ProfilePath" :
"c:/Software/CIB/_IPL_problems/2016_11_29/processing_profile.xml", },"Border" : { "Width" : "3", "Color" :"0,255,0", }, "SpecialPageRange" : { "PageRange"
: "2-2", "AutoRotation":false, "MaxHeight" :"1000", "Border" : { "Width" : "5","Color" : "255,0,0", }, "ImageToolboxParams" : {"AlgorithmSetPath" :
"c:/Software/CIB/_IPL_problems/2016_11_29/AlgorithmsSet_sample.xml","AlgorithmName" : "Invert", "ProfilePath1" :
"c:/Software/CIB/_IPL_problems/2016_11_29/processing_profile.xml", },}, }
Parameter |
Type |
Description |
Possible values |
Default |
PageRange |
<start> [-<end>] |
Page range |
Accepts only positive numbers |
|
MaxWidth |
Number |
Maximum width of an input image |
Accepts only positive numbers |
0 |
MaxHeight |
Number |
Maximum height of an input image |
Accepts only positive numbers |
0 |
MaxResolutionX |
Number |
Maximum X resolution of an image |
Accepts only positive numbers |
0 |
MaxResolutionY |
Number |
Maximum Y resolution of an image |
Accepts only positive numbers |
0 |
ColorSpace |
String |
Output color space of an image |
See here |
sRGB |
ColorDepth |
Number |
Output color depth of an image |
Accepts only positive numbers |
0 |
Encoding |
String |
Output encoding of an image |
Any supported by IPL image format |
JPEG |
CompressionLevel |
Number |
Quality for PNG format. See more in Quality property |
Numbers in the range [0; 100]. 100 is the highest quality |
50 |
Compression |
Number |
Same as CompressionLevel. CompressionLevel has higher priority |
Numbers in the range [0; 100]. 100 is the highest quality |
50 |
Quality |
Number |
Regulates quality of an output image. See more here |
Numbers in the range [0; 100]. 100 is the highest quality |
-1 |
Border |
JSON |
Specializes border for an image |
|
|
SpecialPageRange |
ImageToolboxParams |
Contains specials params for some PageRange It may contain the same properties like the parent PageRange does. The Default Values however are not set for the SpecialPageRange |
Any valid JSON with right properties |
|
AutoRotation |
Boolean |
Enable autorotation based on EXIF information |
True | False |
True |
KeepAspectRatio |
Boolean |
Keep ratio between sides |
True | False |
False |
MultiPageOutput |
Boolean |
Regulates multi page output |
True | False |
False |
ExpandImage |
Boolean |
Fit image in an output image size. If False, crops an image |
True | False |
True |
Width |
Number/String |
Set output image width |
Any positive number |
|
Width_Top |
Number/String |
Set border width at top |
Any positive number |
|
Width_Bottom |
Number/String |
Set border width at bottom |
Any positive number |
|
Width_Left |
Number/String |
Set border width at left |
Any positive number |
|
Width_Right |
Number/String |
Set border width at right |
Any positive number |
|
Color |
Number/String |
Set color for border |
Set of three colors [0; 255] |
|
Color_Top |
Number/String |
Set color for border at top |
Set of three colors [0; 255] |
|
Color_Bottom |
Number/String |
Set color for border at bottom |
Set of three colors [0; 255] |
|
Color_Left |
Number/String |
Set color for border at left |
Set of three colors [0; 255] |
|
Color_Right |
Number/String |
Set color for border at right |
Set of three colors [0; 255] |
|