I would be okay with me if you didn't have this extra first time true/false argument, and when the context was lost just allow the image to be freed, so then we'd restart completely from scratch when the context was restored.

It would also be fine with me if on context lost you just passed some kind of error code to onProgress or to gotBlob.

I'm assuming that it is still the case that we'll lose this context only if the user locks the phone or switches apps while an edited image is being saved.  It is okay with me if when we come back to the gallery the user sees an unsaved image and has to click the save button again.  Would that simplify things?