The CELIO JavaScript global object. Provide information about image file.
More...
The CELIO JavaScript global object. Provide information about image file.
◆ getInformation() [1/2]
QScriptValue CELIO::getInformation |
( |
String |
path | ) |
|
Returns information about the resolution of an image file.
◆ getInformation() [2/2]
QScriptValue CELIO::getInformation |
( |
String |
path, |
|
|
bool |
withLayers |
|
) |
| |
Returns information about the resolution of an image file. Will also return the layer information if withLayer argument is true.
◆ getLayerGroupInformation()
QScriptValue CELIO::getLayerGroupInformation |
( |
String |
filename | ) |
|
- Parameters
-
filename | Path to the image file. |
◆ getLayerInformation()
QScriptValue CELIO::getLayerInformation |
( |
String |
path | ) |
|
Returns an array describing each layer of a multi-layer image. Currently, only the PSD has multi-layer information.
◆ writeLayeredFile()
bool CELIO::writeLayeredFile |
( |
String |
format, |
|
|
String |
options, |
|
|
QScriptValue |
groupArray, |
|
|
String |
outputFile, |
|
|
int |
dpi = 72 |
|
) |
| |
Create a multi-layer grouped file from a hierarchical data structure of groups, sub-groups, and layers.
- Parameters
-
format | The format of the output file (e.g.: "psd") |
options | The format related options (e.g.: for 'psd', this could be "PSD3", "PSD4", "PSD1", "PSDDP4", "PSDDP3") |
groupArray | An array of Drawing and Group objects. A Group object should have a 'name' string property and a 'children' property that is an array of sub items. A Drawing object should have a 'name' string property and a 'file' string property. |
outputFile | The full path to the output file. |
dpi | optional Dots per Inches (aka Pixels per Inches) to override the default of 72, range from 1 to 20,000 |
- Returns
- true if the creation was successful.
var items = [ {
name: 'firstGroup',
children: [ {
name: 'a_sub_group',
children: [ getMoreRecuriveSubGroups(), { name: '1', file: '/path/to/file-a-sub-1.png' } ]
},
{ name: '1', file: '/path/to/file-1.png' },
{ name: 'two', file: /path/to/file-two.psd' }
]
}, {
name: 'secondGroup',
children: [ { name: 'foo', file: '/path/to/foo.png' } ]
}, {
name: 'bar', file: '/path/to/bar.png'
}
];
var result = CELIO.writeLayeredFile('psd', 'PSD4', items, '/path/to/output.psd');