Always write png instead of jpg.
This commit is contained in:
parent
815c19e893
commit
f718110834
|
@ -118,12 +118,8 @@ std::shared_ptr<TextureData> TextureBuilder::combine(
|
|||
}
|
||||
}
|
||||
|
||||
// write a .png iff we need transparency in the destination texture
|
||||
bool png = includeAlphaChannel;
|
||||
|
||||
std::vector<char> imgBuffer;
|
||||
int res;
|
||||
if (png) {
|
||||
res = stbi_write_png_to_func(
|
||||
WriteToVectorContext,
|
||||
&imgBuffer,
|
||||
|
@ -132,10 +128,6 @@ std::shared_ptr<TextureData> TextureBuilder::combine(
|
|||
channels,
|
||||
mergedPixels.data(),
|
||||
width * channels);
|
||||
} else {
|
||||
res = stbi_write_jpg_to_func(
|
||||
WriteToVectorContext, &imgBuffer, width, height, channels, mergedPixels.data(), 80);
|
||||
}
|
||||
if (!res) {
|
||||
fmt::printf("Warning: failed to generate merge texture '%s'.\n", mergedFilename);
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in New Issue