Skip to content

Commit

Permalink
Swap channel id arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Mar 8, 2024
1 parent 9abad43 commit 99f48c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/src/DeclareImageLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ std::unordered_map<Enum::ChannelID, std::vector<T>> generateImageData(py::array_
const T* startPtr = image_data.data() + i * channelSize;
std::memcpy(reinterpret_cast<uint8_t*>(channelData.data()), reinterpret_cast<const uint8_t*>(startPtr), channelSize * sizeof(T));

img_data_cpp[rgbChannelIDs[i]] = channelData;
img_data_cpp[cmykChannelIds[i]] = channelData;
}
return img_data_cpp;
}
Expand All @@ -100,7 +100,7 @@ std::unordered_map<Enum::ChannelID, std::vector<T>> generateImageData(py::array_
const T* startPtr = image_data.data() + i * channelSize;
std::memcpy(reinterpret_cast<uint8_t*>(channelData.data()), reinterpret_cast<const uint8_t*>(startPtr), channelSize * sizeof(T));

img_data_cpp[rgbChannelIDs[i]] = channelData;
img_data_cpp[greyChannelIDs[i]] = channelData;
}
return img_data_cpp;
}
Expand Down

0 comments on commit 99f48c5

Please sign in to comment.