17 QHash<int, int> compToIndex;
18 compToIndex[COMPRESSION_NONE] = 0;
19 compToIndex[COMPRESSION_JPEG] = 1;
20 compToIndex[COMPRESSION_ADOBE_DEFLATE] = 2;
21 compToIndex[COMPRESSION_LZW] = 3;
22 compToIndex[COMPRESSION_PIXARLOG] = 8;
24 const QHash<quint16, int> psdCompToIndex = {
31 cfg->setProperty(
"compressiontype", compToIndex.value(
compressionType, 0));
32 cfg->setProperty(
"predictor",
predictor - 1);
33 cfg->setProperty(
"alpha",
alpha);
34 cfg->setProperty(
"psdCompressionType",
37 cfg->setProperty(
"flatten",
flatten);
48 QHash<int, int> indexToComp;
49 indexToComp[0] = COMPRESSION_NONE;
50 indexToComp[1] = COMPRESSION_JPEG;
51 indexToComp[2] = COMPRESSION_ADOBE_DEFLATE;
52 indexToComp[3] = COMPRESSION_LZW;
53 indexToComp[4] = COMPRESSION_PIXARLOG;
57 indexToComp[8] = COMPRESSION_PIXARLOG;
59 const QHash<int, quint16> psdIndexToComp = {
65 indexToComp.value(cfg->getInt(
"compressiontype", 0), COMPRESSION_NONE));
67 predictor =
static_cast<quint16
>(cfg->getInt(
"predictor", 0)) + 1;
68 alpha = cfg->getBool(
"alpha",
false);
71 psdIndexToComp.value(cfg->getInt(
"psdCompressionType", 0),
73 flatten = cfg->getBool(
"flatten",
true);
74 jpegQuality =
static_cast<quint16
>(cfg->getInt(
"quality", 80));