| 139 | } |
| 140 | |
| 141 | void transformImage( ImagePrimitive *image, const std::string &inputSpace, const std::string &outputSpace ) |
| 142 | { |
| 143 | if( outputSpace == inputSpace ) |
| 144 | { |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | ColorTransformer transformer( inputSpace, outputSpace, image->getDataWindow().size().x + 1, image->getDataWindow().size().y + 1 ); |
| 149 | |
| 150 | for( auto &channel : image->channels ) |
| 151 | { |
| 152 | if( channel.first == "A" || channel.first == "Z" ) |
| 153 | { |
| 154 | continue; |
| 155 | } |
| 156 | |
| 157 | IECore::despatchTypedData<ColorTransformer, IECore::TypeTraits::IsNumericVectorTypedData>( channel.second.get(), transformer ); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | } // namespace ColorAlgo |
| 162 |
no test coverage detected