Revision: 14218
          http://sourceforge.net/p/skim-app/code/14218
Author:   hofman
Date:     2024-04-18 15:45:09 +0000 (Thu, 18 Apr 2024)
Log Message:
-----------
get bitmap context parameters from CGImage

Modified Paths:
--------------
    trunk/SKMainWindowController_FullScreen.m

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2024-04-18 14:43:09 UTC (rev 
14217)
+++ trunk/SKMainWindowController_FullScreen.m   2024-04-18 15:45:09 UTC (rev 
14218)
@@ -323,7 +323,7 @@
             NSRect tbFrame = [tbWindow frame];
             size_t width = CGImageGetWidth(cgImage), height = 
CGImageGetHeight(cgImage);
             CGFloat sx = width / NSWidth(frame), sy = height / NSHeight(frame);
-            CGContextRef ctx = CGBitmapContextCreate(NULL, width, height, 8, 4 
* width, CGImageGetColorSpace(cgImage), kCGBitmapByteOrder32Host | 
kCGImageAlphaPremultipliedFirst);
+            CGContextRef ctx = CGBitmapContextCreate(NULL, width, height, 
CGImageGetBitsPerComponent(cgImage), CGImageGetBytesPerRow(cgImage), 
CGImageGetColorSpace(cgImage), CGImageGetBitmapInfo(cgImage));
             CGContextDrawImage(ctx, CGRectMake(0.0, 0.0, width, height), 
cgImage);
             CGContextDrawImage(ctx, CGRectMake(sx * (NSMinX(tbFrame) - 
NSMinX(frame)), sy * (NSMinY(tbFrame) - NSMinY(frame)), sx * NSWidth(tbFrame), 
sy * NSHeight(tbFrame)), tbCgImage);
             CGImageRelease(tbCgImage);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to