summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2845743)
raw | patch | inline | side by side (parent: 2845743)
author | johncliff <johncliff@users.sourceforge.net> | |
Tue, 30 May 2006 16:10:10 +0000 (16:10 +0000) | ||
committer | johncliff <johncliff@users.sourceforge.net> | |
Tue, 30 May 2006 16:10:10 +0000 (16:10 +0000) |
src/trace/potrace/inkscape-potrace.cpp | patch | blob | history |
index 4aaf1b37694d6b53b84382ec994e3a1b32ee8254..12ffc551a862c2da0cee7edb673eccf3877eba6b 100644 (file)
if (engine.getMultiScanSmooth())
{
RgbMap *gaussMap = rgbMapGaussian(gm);
- newGm = rgbMapQuantize(gaussMap, 8, engine.getMultiScanNrColors());
+ newGm = rgbMapQuantize(gaussMap, (int)log2(engine.getMultiScanNrColors())+2, engine.getMultiScanNrColors());
gaussMap->destroy(gaussMap);
}
else
{
- newGm = rgbMapQuantize(gm, 8, engine.getMultiScanNrColors());
+ newGm = rgbMapQuantize(gm, (int)log2(engine.getMultiScanNrColors())+2, engine.getMultiScanNrColors());
}
gm->destroy(gm);
}
if (engine.getMultiScanSmooth())
{
RgbMap *gaussMap = rgbMapGaussian(gm);
- newGm = rgbMapQuantize(gaussMap, 8, engine.getMultiScanNrColors());
+ newGm = rgbMapQuantize(gaussMap, (int)log2(engine.getMultiScanNrColors())+2, engine.getMultiScanNrColors());
gaussMap->destroy(gaussMap);
}
else
{
- newGm = rgbMapQuantize(gm, 8, engine.getMultiScanNrColors());
+ newGm = rgbMapQuantize(gm, (int)log2(engine.getMultiScanNrColors())+2, engine.getMultiScanNrColors());
}
gm->destroy(gm);
{
for (int x=0 ; x<grayMap->width ; x++)
{
- BM_UPUT(potraceBitmap, x, y,
+ BM_UPUT(potraceBitmap, x, y,
grayMap->getPixel(grayMap, x, y) ? 0 : 1);
}
}
}
/* trace a bitmap*/
- potrace_state_t *potraceState = potrace_trace(potraceParams,
+ potrace_state_t *potraceState = potrace_trace(potraceParams,
potraceBitmap);
//## Free the Potrace bitmap
if ( nodeCount)
*nodeCount = thisNodeCount;
-
+
return d;
}