Fix support of paletted images and alpha channel in imageio (#2420)

This commit is contained in:
Romain Guy
2020-04-18 16:32:05 -07:00
committed by GitHub
parent 038cecd8e2
commit c28d9ddb9d
5 changed files with 60 additions and 34 deletions

View File

@@ -342,9 +342,9 @@ void generateMipmaps(const LinearImage& source, Filter filter, LinearImage* resu
uint32_t width = source.getWidth();
uint32_t height = source.getHeight();
for (uint32_t n = 0; n < mips; ++n) {
width = std::max(width >> 1u, 1u);
height = std::max(height >> 1u, 1u);
result[n] = resampleImage(source, width, height, filter);
width = std::max(width >> 1u, 1u);
height = std::max(height >> 1u, 1u);
result[n] = resampleImage(source, width, height, filter);
}
}