• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Interleaved vs. Planar Image

Participant ,
Oct 19, 2017 Oct 19, 2017

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.

TOPICS
SDK

Views

3.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Oct 19, 2017 Oct 19, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 20, 2017 Oct 20, 2017

Copy link to clipboard

Copied

Namely this will have the lowest latency to get data, right?

Thank You.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Oct 20, 2017 Oct 20, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 20, 2017 Oct 20, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 12, 2021 Oct 12, 2021

Copy link to clipboard

Copied

LATEST

@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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines