Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of CGImage using WIC #1185

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.nef filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion Frameworks/Accelerate/vImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ vImage_Error vImageBuffer_InitWithCGImage(
if (result == kvImageNoError) {
const uint32_t srcPitch = CGImageGetBytesPerRow(image);
const uint32_t dstPitch = buffer->rowBytes;
BYTE* srcData = reinterpret_cast<BYTE*>(_CGImageGetData(image));
const BYTE* srcData = static_cast<const BYTE *>([static_cast<NSData*>(CGImageGetDataProvider(image)) bytes]);
BYTE* dstData = reinterpret_cast<BYTE*>(buffer->data);
const uint32_t bytesPerPixel = format->bitsPerPixel >> 3;
const uint32_t bytesToCopy = width * bytesPerPixel;
Expand Down
5 changes: 5 additions & 0 deletions Frameworks/CoreGraphics/CGColorSpace.mm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ CGColorSpaceRef CGColorSpaceCreateDeviceGray() {
return (CGColorSpaceRef) new __CGColorSpace(kCGColorSpaceModelMonochrome);
}


CGColorSpaceRef _CGColorSpaceCreate(CGColorSpaceModel model) {
return static_cast<CGColorSpaceRef>(new __CGColorSpace(model));
}

/**
@Status Caveat
@Notes Only GenericRGB, GenericRGBLinear and GenericGray supported
Expand Down
Loading