make brushes square when imported from ABR
This commit is contained in:
@@ -77,8 +77,10 @@ void NodePanelBrush::init()
|
||||
{
|
||||
std::string path_high = App::I.data_path + "/brushes/" + samp.first + ".png";
|
||||
std::string path_thumb = App::I.data_path + "/brushes/thumbs/" + samp.first + ".png";
|
||||
samp.second->save(path_high);
|
||||
auto thumb = samp.second->resize(64, 64);
|
||||
auto padded = samp.second->resize_squared(glm::u8vec4(255));
|
||||
auto high = padded.resize_power2();
|
||||
high.save(path_high);
|
||||
auto thumb = padded.resize(64, 64);
|
||||
thumb.save(path_thumb);
|
||||
|
||||
async_start();
|
||||
@@ -123,7 +125,7 @@ void NodePanelBrush::init()
|
||||
std::string path_high = App::I.data_path + "/brushes/" + name + ".png";
|
||||
std::string path_thumb = App::I.data_path + "/brushes/thumbs/" + name + ".png";
|
||||
|
||||
img = img.resize_squared();
|
||||
img = img.resize_squared(glm::u8vec4(255));
|
||||
img.gayscale_alpha();
|
||||
|
||||
auto thumb = img.resize(64, 64);
|
||||
|
||||
Reference in New Issue
Block a user