Skip to main content
Known Participant
September 18, 2011
Answered

getting pixels of specific channel

  • September 18, 2011
  • 1 reply
  • 993 views

Hi everyone!

Does anyone know
how to access the pixel values ​​of each channel separately? i wanna make transform RBG to XYZ and I must change pixels od channel. Pleasse help!



This topic has been closed for replies.
Correct answer Chris Cox

A filter could just use the AdvanceState calls as usual.

And if you want to convert RGB To XYZ, you'll need all 3 channels at once, not separately.

1 reply

Chris Cox
Legend
September 18, 2011

For which type of plugin?

For filters, formats, and export you can use the standard API to request each channel at a time, or all channels interleaved together.

For some plugin types you can also use the channel port suite to do the same thing.

Have you tried looking at the example plugins to see how they work, and to find one similar to what you are trying to do?

Known Participant
September 18, 2011

Filter Plugin.

I found the code samples in PoorMansTypeTool

gPSChannelPortsSuite->ReadPixelsFromLevel and gPSChannelPortsSuite->WritePixelsToBaseLevel , i try this:)

Chris Cox
Chris CoxCorrect answer
Legend
September 18, 2011

A filter could just use the AdvanceState calls as usual.

And if you want to convert RGB To XYZ, you'll need all 3 channels at once, not separately.