XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Is this a good use of XML: XML-formatted images?

It's important to ask what requirements led to a data format or standard.† There can be a lot, but some important ones were/are: size / information density of the formatted data† (lots of data into few bytes so it doesn't take up too much space or bandwith); streaming capability (able to stream and 'view/play' without needing† the whole 'file'; e.g., important for video);† data redundancy / integrity checking (ability to recover from partial loss or corruption of data, or to detect corrupted data).

XML is a great 'general purpose' way to represent data, but not optimal against requirements it was not designed against.


On 29-Oct-17 9:01 AM, Costello, Roger L. wrote:

Hi Folks,

JPEG/JFIF, GIF, PNG, BMP are, as you know, binary data formats for images.

Why are there no XML-formatted images? Is XML not a good format for images? If itís not, why not? Iíll speculate: perhaps the reason is simply that XML is too verbose. Is that the reason? Are there other reasons?

Below is a fictitious XML-formatted image. It has a metadata section with XML elements describing the image. After that is an image section containing the raw pixel (RGB) data.

As I look at this fictitious XML-formatted image, I tend to think that XML is not a good fit. Hereís why: Each pixel element contains text that is meaningless on its own. For example, what does <red>100</red> mean? Meaning Ė the image -- is spread over a large collection of elements. Perhaps, when meaning is spread widely and thinly, it is harder for applications to find meaning in XML than in binary?

Thoughts?

/Roger

<My-New-Image-Format>
†††
<Metadata>
†††††††
<make>Canon</make>
†††††††
<model>Canon EOS 60D</model>
†††††††
<exposure>1/100</exposure>
†††††††
<aperture>4.5</aperture>
†††††††
<focal-length>40.0 mm</focal-length>
††††††† ...
†††
</Metadata>
†††
<Image>
†††††††
<Row>
†††††††††††
<Pixel>
†††††††††††††††
<Red>100</Red>
†††††††††††††††
<Green>0</Green>
†††††††††††††††
<Blue>0</Blue>
†††††††††††
</Pixel>
†††††††††††
<Pixel>
†††††††††††††††
<Red>100</Red>
†††††††††††††††
<Green>0</Green>
†††††††††††††††
<Blue>0</Blue>
†††††††††††
</Pixel>
††††††††††† ...
†††††††
</Row>
††††††† ...
†††
</Image>
</My-New-Image-Format>


-- 
Ian Graham // <http://www.iangraham.org> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS