Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions krest/core/AutoLevelsTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void AutoLevelsTask::execute()
auto const channelOffset = (pt.type == PixelType::SIGNED ? 0.5 : 0.0);
auto const channelScale =
imageChannelScale(pt) / static_cast<double>(channels);
auto chanelWeights = std::vector<double>(channels, channelScale);
auto channelWeights = std::vector<double>(channels, channelScale);

// Examine image
while (stride--)
Expand All @@ -262,7 +262,7 @@ void AutoLevelsTask::execute()
}

// Get pixel value
auto const v = (*pf)(image, i << stride, j << stride, chanelWeights);
auto const v = (*pf)(image, i << stride, j << stride, channelWeights);
auto const vn = std::min(std::max(0.0, v + channelOffset), 1.0);

// Get bucket index and increment bucket count
Expand Down
6 changes: 3 additions & 3 deletions krest/core/ImageUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ void KREST_CORE_EXPORT imageToTexture(
auto const yk = image.height();
auto const ck = image.depth();

auto const xs = image.w_step();
auto const ys = image.h_step();
auto cs = image.d_step();
auto const xs = image.w_step() * ss;
auto const ys = image.h_step() * ss;
auto cs = image.d_step() * ss;

auto* first = reinterpret_cast<char const*>(image.first_pixel());
auto const isPlanePacked = (std::abs(cs) > std::abs(ys));
Expand Down