Skip to content

Commit

Permalink
Add even more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Mar 8, 2024
1 parent d20ab9f commit f2863a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/src/DeclareImageLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ std::unordered_map<Enum::ChannelID, std::vector<T>> generateImageData(py::array_
for (size_t i = 0; i < shape[0]; ++i)
{
std::vector<T> channelData(channelSize);
/*const T* startPtr = image_data.data() + i * channelSize;
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));
*/
std::cout << "Iteration: " << i << std::endl;
img_data_cpp[rgbChannelIDs[i]] = channelData;
std::cout << "img_data_cpp size: " << img_data_cpp.size() << std::endl;
}
std::cout << "Returning image data" << std::endl;
return img_data_cpp;
}

Expand Down Expand Up @@ -157,7 +157,9 @@ std::shared_ptr<ImageLayer<T>> createImageLayerFromNpArray(

// Generate an unordered dict from the image data trying to automatically decode channels into their corresponding
// channel mappings
std::cout << "Generating image data..." << std::endl;
auto img_data_cpp = generateImageData(image_data, width, height, color_mode);
std::cout << "Generated image data" << std::endl;

params.layerName = layer_name;
params.blendMode = blend_mode;
Expand Down

0 comments on commit f2863a2

Please sign in to comment.