Revision: 28703
http://sourceforge.net/p/bibdesk/svn/28703
Author: hofman
Date: 2024-02-07 23:52:20 +0000 (Wed, 07 Feb 2024)
Log Message:
-----------
encode bitmap data when using internal bitmap pointer
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
2024-02-07 17:03:21 UTC (rev 28702)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
2024-02-07 23:52:20 UTC (rev 28703)
@@ -123,7 +123,16 @@
[aCoder encodeInteger:_shouldInterpolate forKey:@"_shouldInterpolate"];
[aCoder encodeInteger:_renderingIntent forKey:@"_renderingIntent"];
[aCoder encodeObject:_colorSpaceDescription
forKey:@"_colorSpaceDescription"];
- [aCoder encodeObject:(__bridge NSData *)_bitmapData
forKey:@"_bitmapData"];
+
+ if (_bitmapPtr) {
+ CFDataRef data =
CFDataCreateWithBytesNoCopy(CFAllocatorGetDefault(), _bitmapPtr,
_bitmapPtrSize, NULL);
+ [aCoder encodeObject:(__bridge NSData *)data
forKey:@"_bitmapData"];
+ CFRelease(data);
+ }
+ else {
+ [aCoder encodeObject:(__bridge NSData *)_bitmapData
forKey:@"_bitmapData"];
+ }
+
[aCoder encodeBytes:(const uint8_t *)_decode length:[self
_decodeLength] forKey:@"_decode"];
}
else {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit