ModelicaSpecification icon indicating copy to clipboard operation
ModelicaSpecification copied to clipboard

Non-exhaustive list of supported bitmap formats

Open henrikt-ma opened this issue 2 years ago • 7 comments

It seems odd that we don't give a complete list of supported bitmap formats: https://github.com/modelica/ModelicaSpecification/blob/a61982fa6be2f8e6e071bc9ea468a39be77cebb8/chapters/annotations.tex#L1015-L1017

Shouldn't we simply replace include by are?

henrikt-ma avatar May 10 '22 06:05 henrikt-ma

If we are going to have a restrictive list, we should also consider including others, like GIF and WebP.

maltelenz avatar May 10 '22 07:05 maltelenz

To me it makes sense to not give an exhaustive restrictive list.

The reason is that if a "new" format, such as gif or webp then:

  1. Tools can directly start supporting them.
  2. It can then be added to this list.

The reason for giving a list is to indicate that every tool should support png, bmp, jpeg, and svg.

HansOlsson avatar May 12 '22 09:05 HansOlsson

The problem, of course, is that such a non-exhaustive list means that if you don't stick to the list you have a valid model that at the same time isn't portable between tools. I'd gladly wait for the standard to catch up with new cool image formats for the sake of ensuring portability across tools.

henrikt-ma avatar May 12 '22 09:05 henrikt-ma

The problem, of course, is that such a non-exhaustive list means that if you don't stick to the list you have a valid model that at the same time isn't portable between tools. I'd gladly wait for the standard to catch up with new cool image formats for the sake of ensuring portability across tools.

That is exactly the idea with giving the non-exhaustive list; as the standard says that the given list shall be supported. If you use another new format it isn't portable until the standard catches up with new format.

HansOlsson avatar May 12 '22 10:05 HansOlsson

To me, a central idea of having a standard implemented by several tools is that the standard should ensure portability. Having a normative gap between being standard compliant and being portable is bad for everyone. If the standard has a definite list and some tool decides to allow non-compliant image formats, then that's up to that tool vendor and its users, but all parties should be aware of the violation of the standard.

henrikt-ma avatar May 12 '22 20:05 henrikt-ma

To answer your original question, I think the answer should be "no".

I think the current wording makes it (sufficiently) clear that portable models should only use the listed file formats. However, it does open up the possibility for a tool to support something else/new. To me this is an issue that does not need fixing, I don't see any value in restricting the small flexibility the specification currently allows.

If somebody wants to issue warning messages for "GIF" then fine by me. But making it a hard restriction seems misplaced, and we risk getting into a long debate of what formats "must" be on the list.

DagBruck avatar May 13 '22 09:05 DagBruck

What are the chances that it would be detected in time that new documentation added to the MSL doesn't stick to the list of portable formats, if the restriction isn't enforced by the library author's tool?

Would it really be that much work to convert images to one of the supported formats?

henrikt-ma avatar May 16 '22 06:05 henrikt-ma