AniMax release image files after opening

This keeps image files from being locked to the AniMax process while an image is open in AniMax
This commit is contained in:
Nathan Fulton 2017-04-25 23:35:44 -04:00
parent c8fba37725
commit ae45c7539f

View File

@ -139,10 +139,12 @@ namespace SpiffCode
strFile);
}
m_strFileName = strFile;
m_bm = new Bitmap(strFile);
using (var bmTemp = new Bitmap(strFile))
m_bm = new Bitmap(bmTemp);
string strPath = Path.GetDirectoryName(strFile);
string strFileName = Path.GetFileName(strFile);
m_bmBlack = new Bitmap(Path.Combine(strPath, "black_" + strFileName));
using (var bmpTemp = new Bitmap(Path.Combine(strPath, "black_" + strFileName)))
m_bmBlack = new Bitmap(bmTemp);
}
private void Load8(string strFileName, bool fUseFirstPaletteEntryAsTransparentColor) {