Skip to content

Commit

Permalink
account for change to nitf::MemorySource
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Apr 18, 2022
1 parent 01d65e5 commit 05fc1f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion six/modules/c++/six/source/NITFWriteControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ static const Legend* getLegend(const six::Container* container, size_t i)
void NITFWriteControl::addLegend(const Legend& legend, int imageNumber)
{
nitf::ImageSource iSource;
nitf::MemorySource memSource(legend.mImage, 0 /*start*/, 0 /*pixelSkip*/);
const void* pImage = legend.mImage.data();
const std::span<const std::byte> image(static_cast<const std::byte*>(pImage), legend.mImage.size());
nitf::MemorySource memSource(image, 0 /*start*/, 1 /*numBytesPerPixel*/, 0 /*pixelSkip*/);
iSource.addBand(memSource);

nitf::ImageWriter iWriter = mWriter.newImageWriter(imageNumber);
Expand Down

0 comments on commit 05fc1f8

Please sign in to comment.