This is my first real experience with rasterdata so my knowledge quite basic.
What I want to do is to convert rasters to vectors using Potrace and the PotraceCaller. The rasters are 8 bit PNG's, see attachments.
In the PotraceCaller, the raster is being written to BMP. The BMP is commandline converted to DXF by Potrace. The DXF is being read, world file applied.
This works great, but not for all rasters. When running the workspace the following warnings show up:
2019-02-06 12:11:52| 0.5| 0.0|WARN |BMP writer: Unsupported palette value interpretation 'RGBA32'. Converting to interpretation 'RGB24'. If this conversion is undesired, consider changing the interpretation explicitly
2019-02-06 12:11:52| 0.5| 0.0|WARN |@ReinterpretRaster: Converting some band/palette interpretations from 'RGBA32' to 'RGB24' might result in a loss of data
I think to understand that a palette is an overview of all variations being used in the raster.
The raster which is successfully converted has the following palette:
RGBA32
0 255,255,255,0
1 150,0,0,255
2 150,0,0,255
The raster which is not successfully converted has the following palette:
RGBA32
0 255,255,255,0
1 255,215,80,255
2 255,215,80,255
I think that 0 255,255,255,0 is the transparant background. The other values are not transparant (255 on 4th position) colors.
What I first tried is to use the RasterPaletteInterpretationCoercer to convert from RGBA32 to RGB24.
- With the parameter "Drop the alpha band" I still didn't got any results.
- With the parameter "Apply the alpha band" I also got the frame of the picture, which I don't want.
I think that 255,215,80,255 is a not processable color for some reason, where 150,0,0,255 works fine. So my workaround now is to extract the palette, replace each value by 150,0,0,255, remove the original palette, add the new palette and process the raster. This works well enough but I encounter other problems.
So my question is: Why is 255,215,80,255 not processed where 150,0,0,255 is processed fine and how to I change this in the rasters?
Thanks for your time!