From fdece91b5e07225a744825bfee1fc0267c8a7b13 Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Mon, 12 Nov 2018 18:56:53 +0900 Subject: [PATCH] fix antialias to toonz raster levels (#2370) --- toonz/sources/toonzlib/tcolumnfx.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/toonz/sources/toonzlib/tcolumnfx.cpp b/toonz/sources/toonzlib/tcolumnfx.cpp index 04e16ef9..4d39bf72 100644 --- a/toonz/sources/toonzlib/tcolumnfx.cpp +++ b/toonz/sources/toonzlib/tcolumnfx.cpp @@ -1158,6 +1158,12 @@ void TLevelColumnFx::doCompute(TTile &tile, double frame, ras = ti->getRaster(); if (sl->getProperties()->antialiasSoftness() > 0) { + // convert colormap raster to fullcolor raster before applying antialias + if (ti) { + TRaster32P convRas(ras->getSize()); + TRop::convert(convRas, ras, ti->getPalette(), TRect(), false, true); + ras = convRas; + } TRasterP appRas = ras->create(ras->getLx(), ras->getLy()); TRop::antialias(ras, appRas, 10, sl->getProperties()->antialiasSoftness()); @@ -1206,7 +1212,7 @@ void TLevelColumnFx::doCompute(TTile &tile, double frame, // Observe that inTile is in the standard reference, ie image's minus the // center coordinates - if (ti) { + if ((TRasterCM32P)ras) { // In the colormapped case, we have to convert the cmap to fullcolor TPalette *palette = ti->getPalette();