AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Inkscape convert png to svg11/13/2023 ![]() While it describes some objects in color, my intention is to produce grayscale images of it as several resolutions in the target output. I was hoping to get a full range of grayscale values, a later processing step (numpy) requires the precision of 16 bit per pixel.Īttached you can find an example svg file that I used. The gradient could potentially deliver that 16 bit per target pixel precision. Independent of the target resolution I do not see more than 220 different pixel values in grayscale 16bit png. In some of my test images I use 3 svg rectangle objects being filled by RadialGradients from red (rgb(100%,0%,0%)), green (rgb(0%,100%,0%)), blue (rgb(0%,0%,100%)) to all black (rgb(0%,0%,0%)). Thank you for your detailed answer and the additional hints regarding the topic. But for basic colours there's no way to set a full 16-bit value, so the values are likely to just be left-shifted to suit. ![]() ![]() gradients, blurs) you might get full resolution values in the export, but I haven't tested. In short: Inkscape colours are stored as 8-bit values. Because the PNG library offered the options, so the developers thought they'd make them available (most likely reason!).As a first step towards better colour support in future, especially if colour formats other than CSS hex RGB are ever supported (speculation).To support linked or embedded content that is 16 bpp without quantising the values when exporting (also unconfirmed).To support more precision in gradients (I haven't confirmed if it does this).To make it easier to use the exported files in a workflow that can use larger bit depths without accidentally reducing the bit depth when overwriting the file.I can think of several possible reasons for allowing 16-bit export: CSS hex notation is limited to 8-bits per channel.Īll of which makes me wonder what the benefit of the Bit Depth popup in the export dialog is. You can see from the XML editor that Inkscape uses RGB hex notation for its colours, even if you set them via the HSL or CMYK tabs in the UI. Unfortunately the CSS colour model(s) are very limited and don't generally support higher bit depths (or other useful things like CMYK or Spot Colours). ![]() Bear in mind that Inkscape uses SVG as its native format, and SVG basically uses CSS for its colour definitions. Pure speculation here, but I would imagine that they are just a left-shift of the 8-bit data. ![]()
0 Comments
Read More
Leave a Reply. |