getImageInfo(params: Object)
Requires:
BaseKit≥2.4.3@ray-js/ray≥0.5.9
Platforms:
iOSAndroid
Description
Get image information
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
src | string | Yes | Image path; supports network and local paths |
complete | () => void | No | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | Callback on successful API call |
fail | (params: Object) => void | No | Failure callback |
success callback parameters
| Property | Type | Description | BaseKit Since |
|---|---|---|---|
width | number | Original image width, in px. Ignoring rotation. | v3.2.6 |
height | number | Original image height, in px. Ignoring rotation. | v3.2.6 |
orientation | string | Device orientation at capture Valid values Description up Default orientation (phone held horizontally), corresponds to 1 in Exif; or no orientation info. up-mirrored Same as up, but mirrored; corresponds to 2 in Exif down Rotated 180°, corresponds to 3 in Exif down-mirrored Same as down, but mirrored; corresponds to 4 in Exif left-mirrored Same as left, but mirrored; corresponds to 5 in Exif right Rotated 90° clockwise, corresponds to 6 in Exif right-mirrored Same as right, but mirrored; corresponds to 7 in Exif left Rotated 90° counterclockwise, corresponds to 8 in Exif | v3.2.6 |
type | string | Image format. Valid values Description unknown Unknown format jpeg JPEG compressed format png PNG compressed format gif GIF compressed format tiff TIFF compressed format | v3.2.6 |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None