system.kanoa.quality.image.processImage(filePath, chkItemId, imageId, imageName, imageType, imageDescription, userId)
Given a filepath, this function will convert the image found to a jpg, create a thumbnail and store it in the database
Parameters
filePath String: Path to the image file
chkItemId Integer: Id of check item. Can be None
imageId Integer: Id of image. Can be None for a new image
imageName String: Name for the image
imageType String: Type of the image. Can be user defined.
imageDescription String: Description of the image
userId Integer:Id of the user executing the function
Returns
imageId Integer
message String None if success
Example
filePath = 'C:\\Users\\jason\\Pictures\\Saved Pictures\\2022-07-10 03.21.12.jpg'
chkItemId = 42
imageId = none
imageName = 'Old Market Town'
imageType = 'photo'
imageDescription = 'Lovely day out in Shropshire'
userId = 5
imageId, msg = system.kanoa.quality.image.processImage(filePath, chkItemId, imageId, imageName, imageType, imageDescription, userId)