top | item 25355325

(no title)

identity0 | 5 years ago

SVG is still a stupid format. Who wants to send image data through XML? It would be like sending a raster image through a big JSON array.

discuss

order

onion2k|5 years ago

Who wants to send image data through XML?

SVGs aren't image data. They're a set of instructions for recreating image data using a structured language. XML is very good for data like that.

porphyra|5 years ago

Text-based formats like XML and JSON are good if most of your data is strings, but storing numeric data in decimal strings is both inefficient and inaccurate. That's why I think that HTML is an appropriate use of XML-like markup but perhaps vector images would need a true binary version.

However I agree with saagarjha that it is very easy to write code to emit SVG, which is nice.

saagarjha|5 years ago

And their text format is exceedingly useful if you're writing code to generate them.

mldbk|5 years ago

SVG is vector. So basically XML is suitable for that task.

porphyra|5 years ago

One could conceivably make a binary format based on Messagepack or Flatbuffers for vector data, which would be much more efficient and eliminate rounding problems of converting between floats and decimal numbers in text representations.