Copy link to clipboard
Copied
Hello,
Photoshop allows plug in to request data in Planar (Each color layer on its own) or Interleaved (RGB, RGB RGB Pixels) format.
I was wondering, what's Photoshop's internal format?
Namely, let's say I request the whole image, which will take less time to get, the interleaved or planar data (Namely which doesn't require Photoshop to do any operations besisdes giving access to data)?
Thank You.
Copy link to clipboard
Copied
Planar.
See DoFilter in the Dissolve example. Use the tile values and get a plane at a time. This will match as close as possible to Photoshop internal.
Copy link to clipboard
Copied
Namely this will have the lowest latency to get data, right?
Thank You.
Copy link to clipboard
Copied
Contiguous? No. Look at the Dissolve example and the outRowBytes from the FilterRecord. We like to align things as that makes it all faster.
Planar all at once? Maybe. I have not tried that but according to what I see in PIFilter.h and PIGeneral.h there is LayoutConstants which might be what you are looking for. I don't see any of our plug-ins doing that.
Lowest latency? That is not an easy answer. Photoshop has zoom levels and a pyramid. If you ask for a zoom level that Photoshop does not have in memory then it will be slow of course. This is the inputRate in FilterRecord.
Please read the comments in PIFilter.h which will take you to PIGeneral.h as well.
Copy link to clipboard
Copied
@TomRuark,
When I get a pointer to a Planar Layer (Let's say R Channel).
Can I assume RGB Channels are contiguous in memory or is there other way to have access to all 3 channels (RGB) in planar format at once?
Thank You.
Copy link to clipboard
Copied
@Royi A - How does Photoshop filter access data in Interleaved ? From my understanding, its all in the stated image modes, which you have to convert to interleaved RGB.