ide: IconDes export to .png now exports correctly uhd/dark variants

git-svn-id: svn://ultimatepp.org/upp/trunk@13469 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-07-02 13:00:45 +00:00
parent feb5abfbb4
commit 9beff35f4f
2 changed files with 9 additions and 2 deletions

View file

@ -354,8 +354,15 @@ void IconDes::ExportPngs()
{
String dir = SelectDirectory();
if(!dir.IsEmpty())
for(int i = 0; i < GetCount(); i++)
PNGEncoder().SaveFile(AppendFileName(dir, GetName(i) + ".png"), GetImage(i));
for(int i = 0; i < GetCount(); i++) {
dword f = GetFlags(i);
String n = GetName(i);
if(f & IML_IMAGE_FLAG_UHD)
n << ".uhd";
if(f & IML_IMAGE_FLAG_DARK)
n << ".dark";
PNGEncoder().SaveFile(AppendFileName(dir, n + ".png"), GetImage(i));
}
}
void IconDes::InsertIml()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before After
Before After