Reversing the condition of if (originalImage != null) and returning early will remove one level of indentation. The less indentation some code shows the easier to read it will become.
catch to just rethrow, althought you did it in the correct way, doesn't buy you anything. Just remove the try..catch..finally and enclose the usage of graphics with an usage ...
The secret to performance is to choose the appropriate data structures which lay out the memory as raw arrays of bytes (or uint8_t values). This is done by creating cython typed memoryviews from numpy arrays or images loaded through PIL. This applies to the border list as well; that is, I create an array of (x, y) coordinates rather than a list of python ...
I would change
protected fun <T: ViewModel>getViewModel(c: Class<T>): T
protected fun <T: ViewModel>getViewModel(c: KClass<T>): T
after replacing the Class with KClass in the activity, you can ...
var zipFile = ZipFile.OpenRead(ChapterLocation);
One word: using.
using (var stream = z.Open())
using (var mstream = new MemoryStream())
mstream.Position = 0;
var bitmap = new BitmapImage();