mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH:rescale thumbnail_3mf cover
Change-Id: I1e0192a66f36898f925adc033457d6f42d3ca999
This commit is contained in:
@@ -450,7 +450,7 @@ bool generate_image(const std::string &filename, wxImage &image, wxSize img_size
|
||||
if (method == GERNERATE_IMAGE_RESIZE) {
|
||||
float h_factor = img.GetHeight() / (float) image.GetHeight();
|
||||
float w_factor = img.GetWidth() / (float) image.GetWidth();
|
||||
float factor = std::max(h_factor, w_factor);
|
||||
float factor = std::min(h_factor, w_factor);
|
||||
int tar_height = (int) ((float) img.GetHeight() / factor);
|
||||
int tar_width = (int) ((float) img.GetWidth() / factor);
|
||||
img = img.Rescale(tar_width, tar_height);
|
||||
@@ -465,7 +465,7 @@ bool generate_image(const std::string &filename, wxImage &image, wxSize img_size
|
||||
return false;
|
||||
}
|
||||
|
||||
image.ConvertAlphaToMask(image.GetMaskRed(), image.GetMaskGreen(), image.GetMaskBlue());
|
||||
//image.ConvertAlphaToMask(image.GetMaskRed(), image.GetMaskGreen(), image.GetMaskBlue());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user