Currenty, the functions calling upon ImageMagick commands assume that everything goes well within these commands. There is no return value we can unit-test easily.
What we should implement is checking for the exit state of each command and see if they are all Null (OK) and alternatively, abort execution as soon as one of them returns anything else but Null.
Of course, even when aborting, we will still be running cleanup in order not to leave any temporary files behind and we should use the opportunity to provide the user with helpful debugging information (Anything is better than some NonNull-error code!).
Currenty, the functions calling upon ImageMagick commands assume that everything goes well within these commands. There is no return value we can unit-test easily.
What we should implement is checking for the exit state of each command and see if they are all Null (OK) and alternatively, abort execution as soon as one of them returns anything else but Null.
Of course, even when aborting, we will still be running cleanup in order not to leave any temporary files behind and we should use the opportunity to provide the user with helpful debugging information (Anything is better than some NonNull-error code!).