Implemented saving pixmap with 1 or 3 channels#268
Implemented saving pixmap with 1 or 3 channels#268marekhrabe wants to merge 1 commit intoadobe-photoshop:masterfrom
Conversation
|
@marekhrabe Thanks for this. The bad news is that I think what @timothynoel is proposing is building the low-level pipeline to send single-channel images over the connection between PS and Node. That'll require a decent amount of modification to both the native side and Nonetheless, this PR will be useful for writing single channel images to disk. So, I'm going to keep this open until we're ready on the native side. Once again, we appreciate your help! |
|
@joelrbrandt I've inspected All |
|
@marekhrabe Admittedly, I was a bit cavalier when I was trying to rush through all my replies yesterday. 😄 I'd love it if it "just works" from the PS communication perspective -- I hope you're right. However, my fear is that there'll be some mismatch between PS's 1-channel format and the 1-channel format that the xpm code expects. (e.g. the 1-channel code from PS might not have the same header structure -- it might just be a raw stream of pixels) But, maybe not! Independent of that, though, is the fact that rewriting the pixmap pipeline to be streaming is very high on our backlog. That means we'll throw out the xpm code we have and write new code to transcribe the stream from PS into a stream that convert can accept. We'll need different paths for 3-channel and 1-channel in that case. Anyway, thanks again for your input! And, certainly, the code in this PR will be useful when @timothynoel wires up 1-channel pixmaps. |
Only place that needed change was the convert implementation, other things look ready. I tested with "synthetic" pixmaps like this one:
This should make it easier to implement mask support as discussed in #161 (comment)
I tested output to png, gif and jpg and all seems working perfectly.