John Hyslop wrote: ↑Fri Oct 07, 2022 5:42 am
for instance when monochrome is unticked alpha and brightness are not available
Essentially, 'Monochrome' means in shades of 1 color, In that case one has to define what shades to include/exclude.
I suspect that the number of colors doesn't matter at that point.
In Peek 2022-10-07 15-38.gif, not monochrome and 2 colors it selects everything In white + black including gray or whole the bitmap.
Ticking 'Monochrome' here means that your bitmap RGB is turned into grayscale (8 BitsPerPixel) on the fly.
The weighted method would be Y = 0.299R + 0.587G + 0.114B
From the help file it is clear that the 'Brightness Threshold' then defines what shade of gray is considered background.
For RGBA there is the A-channel threshold (transparency).
But both 'Thresholds' then speak of all black, all white what in essence is black/white (1 BitsPerPixel).
John Hyslop wrote: ↑Fri Oct 07, 2022 6:01 am
inconsistent results with same values entered
Indeed, one would expect the same results from the same settings.
Remark that you ask to reduce the color depth to 3 colors and there are indeed 3 spikes in the Histogram:
White, black and the gray from the checker board, all three with some nuances.
Jpeg files are not ideal sources because of the decompression artifacts, there are 220 unique colors in the star example.
What threshold is used for a certain color depth eludes me.
John Hyslop wrote: ↑Fri Oct 07, 2022 5:19 am
Is there a reason we need to update with defaults 1st then change?
I think not, but it might simply be the '
inconsistent results' and with what you start with.
Fully testing this new QCAD feature would require consistent results.
QCAD trace path is nothing similar or close to Inkscape Trace path.
The latter will export splines while QCAD sticks to polylines.
If we overlay the dxf over the Face.png (scaled 0.75), it is obvious that Inkscape draws an envelope around darker regions.
For this every pixel is locally weighted regarding their neighbors.
That picture has 397 unique colors.
Still, at some points Inkscape soften corners where we see/suspect hard corners.
I am more troubled with the fact that it locks up when no image is selected.
QQ is needed to terminate the tool.
Script based:
Rather odd that any entity type is welcome for the
prevImageEntity variable.
With a multiple selection the odds are against us that the first queried entity id is indeed the intended image.
In debugger mode an
uncaught exception is thrown without an image entity, the script simply halts at that point.
Starting the tool doesn't display a preview image,
That figures because the preview, a scaled image + trace, is only generated when hitting the 'Update' button.
On would expect the dialog to open with the image ... Without tracing.
Further, I suspect the preview to be not consistent with the final result.
The preview trace is preformed on a QImage scaled to fit 256 by 256 pixels preserving the aspect ratio.
The final result is preformed on the actual image file of all selected images.
A scaled bitmap is never equal to the original, that all depends on the algorithm that is used.
Face.png is 446 x 380 px and star.jpeg is 728 x 508 px
Regards,
CVH