harrydb / go

12 stars 8 forks source link

Registered format names should be simple and emphasize machine readability #6

Open extemporalgenome opened 10 years ago

extemporalgenome commented 10 years ago

Format names consistent with all other image packages would include, for example, "pnm" for all sub-formats, or "pbm", "pgm", "ppm", and "pam". White-space and superfluous detail/description should be avoided, and the distinction between plain and raw formats doesn't need to be represented in format names, since the semantics of, e.g. a raw pbm and a plain pbm are precisely identical. Ideally, format names should consist only of [a-z0-9]

Consider: https://code.google.com/p/go/source/browse/tiff/reader.go?repo=image#597. The little and big endian variants are both represented with the format name "tiff", as their semantics are identical.

extemporalgenome commented 10 years ago

The cleanest approach may just be to use "pnm" as the universal format name for the entire library, while exposing subformat details in PNMConfig for those applications that really need it.