* Analyzes the open image and adds image info to a database.
* Analyzes the open image and adds image info to a database.
* Does not deal with transactions and such. Refer to startAddImage()
* Does not deal with transactions and such. Refer to startAddImage()
* for more control.
* for more control.
* @returns 1 if an error occured (error will have been registered)
* @returns 1 if a critical error occured (DB doesn't exist, no file system, etc.), 2 if errors occured at some point adding files to the DB (corrupt file, etc.), and 0 otherwise. Errors will have been registered.
* Same functionality as addFilesInImgToDb(). Reverts
* Same functionality as addFilesInImgToDb(). Reverts
* all changes on error. User must call either commitAddImage() to commit the changes,
* all changes on error. User must call either commitAddImage() to commit the changes,
* or revertAddImage() to revert them.
* or revertAddImage() to revert them.
* @returns 1 if any error occured (messages will be registered in list), 2 if error occured but add image process can continue, and 0 on success
* @returns 1 if critical system error occcured (data does not exist in DB), 2 if error occured while adding files to DB (but it finished), and 0 otherwise. All errors will have been registered.