Comments (3)
Thanks for reporting it and providing the details to reproduce it!
I'm not sure if that is the actual correct fix, and assuming it might break some other format
This line was introduced in order to address the following issues: #782 (comment). I think there is something I'm missing.
from nuke.
Fixed in v12.7.2.
RCA
It was a regression introduced in v12.7 in the scope of the fix for #782.
In 12.7.0, I added the following line to the code that specified the alpha info for CGContext
:
if image.bitsPerPixel == 8 {
return .none // The only pixel format supported for grayscale CS
}
I assumed that 8 bpp was only valid for grayscale color spaces, but forgot about the packed pixel formats (kCGImagePixelFormatPacked
).
The new version has an additional condition:
if colorSpace.numberOfComponents == 1 && image.bitsPerPixel == 8 {
return .none // The only pixel format supported for grayscale CS
}
I can't say that I'm an expert in pixel formats, so if someone else could review it, that would be fantastic. I'm also open to suggestions for how to improve it.
Debug
Here's some more information from CoreGraphics
if you turn the debug flags on:
<CGImage 0x10460eff0> (IP)
<<CGColorSpace 0x60000260d7a0> (kCGColorSpaceIndexed; base <CGColorSpace 0x60000260d320> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1))>
width = 1200, height = 642, bpc = 8, bpp = 8, row bytes = 1200
kCGImageAlphaNone | 0 (default byte order) | kCGImagePixelFormatPacked
is mask? No, has masking color? No, has soft mask? No, has matte? No, should interpolate? Yes
CGBitmapContextCreate: unsupported parameter combination:
RGB
8 bits/component, integer
2272 bytes/row
kCGImageAlphaNone
kCGImageByteOrderDefault
kCGImagePixelFormatPacked
Valid parameters for RGB color space model are:
16 bits per pixel, 5 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaNoneSkipLast
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedFirst
32 bits per pixel, 8 bits per component, kCGImageAlphaPremultipliedLast
32 bits per pixel, 10 bits per component, kCGImageAlphaNone|kCGImagePixelFormatRGBCIF10|kCGImageByteOrder16Little
64 bits per pixel, 16 bits per component, kCGImageAlphaPremultipliedLast
64 bits per pixel, 16 bits per component, kCGImageAlphaNoneSkipLast
64 bits per pixel, 16 bits per component, kCGImageAlphaPremultipliedLast|kCGBitmapFloatComponents|kCGImageByteOrder16Little
64 bits per pixel, 16 bits per component, kCGImageAlphaNoneSkipLast|kCGBitmapFloatComponents|kCGImageByteOrder16Little
128 bits per pixel, 32 bits per component, kCGImageAlphaPremultipliedLast|kCGBitmapFloatComponents
128 bits per pixel, 32 bits per component, kCGImageAlphaNoneSkipLast|kCGBitmapFloatComponents
See Quartz 2D Programming Guide (available online) for more information.
from nuke.
Thanks for the quick fix!
from nuke.
Related Issues (20)
- Missing support for macCatalyst in Nuke 12.4 HOT 2
- LazyImage(url:) does not load image when using ImageRenderer HOT 4
- Add mandatory privacy manifest HOT 1
- SwiftUI Warning: Accessing StateObject's object without being installed on a View. This will create a new instance each time. HOT 2
- Xcode 15.3 concurrency warnings when using `Screen.scale`
- The operation couldn’t be completed: ImagePipeline.Error error 0 HOT 1
- Missing documentation for using LazyImage implementation inside Package HOT 2
- ImageRequest userInfo dictionary `Any` type for value allows unsupported types for imageIdKey HOT 2
- Any way to modify ImageRequest before it's executed? HOT 1
- Potential Memory Issue when using any processors such as Resize HOT 11
- Custom DataLoader without native URL cache HOT 1
- JPG not resizing, just black HOT 2
- Xcode warning: IO on main thread HOT 1
- Add dataTask that is similar to imageTask HOT 2
- Skip decompression for .png images and other uncompressed formats HOT 1
- Authorization header HOT 2
- Image scaling bug HOT 11
- What would be the most elegant way to decrypt image data before it is sent to the pipeline? HOT 3
- Is there any way to apply transition to placeholder?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuke.