The CELIO JavaScript global object. Provide information about image file.
More...
The CELIO JavaScript global object. Provide information about image file.
◆ getInformation() [1/2]
QVariant CELIO::getInformation |
( |
String |
path | ) |
|
Returns information about the resolution of an image file.
◆ getInformation() [2/2]
QVariant 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.
◆ getLayerInformation()
QVariant 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 |
|
) |
| |
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 group objects, a group object should have a 'name' string property, an optional 'groups' array property, and an optional 'layers' array property. The 'layers' array should be made of objects with the 'name' string property and 'file' string property. |
outputFile | The full path to the output file. |
- Returns
- true if the creation was successful.
var groups = [ {
name: 'firstGroup',
groups: [ {
name: 'a_sub_group',
layers: [ { name: '1', file: '/path/to/file-a-sub-1.png' } ],
groups: getMoreRecuriveSubGroups()
}
layers: [
{ name: '1', file: '/path/to/file-1.png' },
{ name: 'two', file: /path/to/file-two.psd' }
]
}, {
name: 'secondGroup',
layers: [ { name: 'foo', file: '/path/to/foo.png' } ]
}
];
var result = CELIO.writeLayeredFile('psd', 'PSD4', groups, '/path/to/output.psd');