<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Use deprecated methods for macOS &lt;10.12
--- src/nsimage.mm
+++ src/nsimage.mm
@@ -100,7 +100,7 @@ static NSImage *DoResize(NSImage *sourceImage, NSSize newSize) {
                             graphicsContextWithBitmapImageRep:rep]];
   [sourceImage drawInRect:NSMakeRect(0, 0, newSize.width, newSize.height)
                  fromRect:NSZeroRect
-                operation:NSCompositingOperationCopy
+                operation:NSCompositeCopy
                  fraction:1.0];
   [NSGraphicsContext restoreGraphicsState];
 
@@ -117,6 +117,7 @@ bool ResizeGivenImage(const char *filePath,
 
   NSImage *source = [[NSImage alloc]
       initWithContentsOfFile:[NSString stringWithUTF8String:filePath]];
+  [source setScalesWhenResized:YES];
   if (source == nil) {
     fprintf(stderr, "Image '%s' could not be loaded.\n", filePath);
     exit(1);
@@ -223,10 +224,10 @@ bool ResizeGivenImage(const char *filePath,
     NSDictionary *props;
 
     if ((isPNG &amp;&amp; !myPicPrefs.allJPEG) || myPicPrefs.allPNG) {
-      filetype = NSBitmapImageFileTypePNG;
+      filetype = NSPNGFileType;
       props = nil;
     } else {
-      filetype = NSBitmapImageFileTypeJPEG;
+      filetype = NSJPEGFileType;
       props = [NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:0.7]
                                           forKey:NSImageCompressionFactor];
     }
@@ -236,7 +237,7 @@ bool ResizeGivenImage(const char *filePath,
     int iter = 0;
     float compression = 0.65;
     if ((myPicPrefs.max_Kbytes != 0) &amp;&amp;
-        (filetype == NSBitmapImageFileTypeJPEG)) {
+        (filetype == NSJPEGFileType)) {
       while ((dataLength &gt; (unsigned)myPicPrefs.max_Kbytes) &amp;&amp; (iter &lt; 10)) {
         props = [NSDictionary
             dictionaryWithObject:[NSNumber numberWithFloat:compression]
</pre></body></html>