Matt Gemmell

TOLL is available now!

An action-thriller novel — book 2 in the KESTREL series.

★★★★★ — Amazon

ImageCrop updated

development & source 1 min read

Just a quick note that my ImageCrop source code has been updated, thanks to a contribution from Matt Tonkin at NovaMind.

In Matt’s own words:

I added:
- (void)drawInRect:(NSRect)dstRect operation:(NSCompositingOperation)op 
fraction:(CGFloat)delta method:(MGImageResizingMethod)resizeMethod;
This has a couple of advantages when drawing directly rather than producing images:
  1. Image Quality - If you're drawing in a scaled view (or with some funky scaling transformation matrix), the images will draw with their full original quality, rather than reduced to the new size (should help for Res Independence).
  2. Speed - as producing a second resized image means drawing twice.
The existing methods still work as they did originally.

Many thanks to Matt for the improvements!