From 3101a8a718f656307f992343a0c32272d5c8a7fa Mon Sep 17 00:00:00 2001 From: Jeremy Bullock Date: May 26 2017 07:41:44 +0000 Subject: premult by default on png (#1217) close #794 --- diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp index 8e692d1..be82ba1 100644 --- a/toonz/sources/toonzlib/preferences.cpp +++ b/toonz/sources/toonzlib/preferences.cpp @@ -103,7 +103,7 @@ inline bool formatLess(const Preferences::LevelFormat &a, //================================================================= void getDefaultLevelFormats(LevelFormatVector &lfv) { - lfv.resize(2); + lfv.resize(3); { LevelFormat &lf = lfv[0]; @@ -116,6 +116,11 @@ void getDefaultLevelFormats(LevelFormatVector &lfv) { lfv[1].m_name = Preferences::tr("Adobe Photoshop"); lfv[1].m_pathFormat = QRegExp("..*\\.psd", Qt::CaseInsensitive); lfv[1].m_options.m_premultiply = true; + + // for all PNG files, set premultiply by default + lfv[2].m_name = Preferences::tr("PNG"); + lfv[2].m_pathFormat = QRegExp("..*\\.png", Qt::CaseInsensitive); + lfv[2].m_options.m_premultiply = true; } }