Hello,
after handling Microsoft color palettes (*.pal) which are riff based, i also
considered other color palettes. The inspected examples are described by
pal-jasc.trid.xml as "JASC format palette file" (see appended
output/trid-old.txt).
There does not exist an official documentation for such files. Most matching
documentation found was at cryer web site. So add reference URL by line:
<RefURL>
http://www.cryer.co.uk/file-types/p/pal.htm</RefURL>
Because inspected palettes are just simple text mime type should be
expressed by line:
<Mime>text/plain</Mime>
Besides file name extension "pal" i also found examples with "psppalette"
extension. This is now expressed by line:
<Ext>PAL/PSPPALETTE</Ext>
I found same palette file as "Safety.pal" in "Paint Shop Pro 5.01" dated
1998 and as "Safety.PspPalette"/"Sicherheit.PspPalette" in latest "Paint
Shop Pro 2018" version. When looking at
http://extension.nirsoft.net/PspPalette we see "PspPalette" is registered as
"PaintShopPro8.Palette" and higher numbers. So it seems that "pal" is used
by older Paint Shop Pro versions when product of Jasc Software ( see URL
https://en.wikipedia.org/wiki/PaintShop_Pro and
https://en.wikipedia.org/wiki/Jasc_Software ) and in newer versions probably 8
longer "PspPalette" extension is used. So mention this fact in remark section.
In old trid definition word like "palette" and "JASC" are found. But when
searching on the net, we see also keywords like "color", "Paint Shop Pro"
and "PSP". So add first words to text in trid definition.
According to reference the second line contains the palette file version
like example "0100" (without the quotes). This would be expressed by XML
construct:
<Pattern>
<Bytes>4A4153432D50414C0D0A303130300D0A</Bytes>
<ASCII> J A S C - P A L . . 0 1 0 0</ASCII>
<Pos>0</Pos>
</Pattern>
Because also in newest "Paint Shop Pro 2018" palette version is still "0100"
there probably exist only one version variant. But i am not sure about
this. So put above described modification in variant definition file
pal-jasc-v1.trid.xml. With this definition file inspected palette files are
described more precisely and even file name extension is now correct (See
appended output/trid-new.txt).
When i use Cyotek Color Palette Editor version 1.6.0.258 (found at
https://www.cyotek.com/cyotek-palette-editor ) to create PSP palettes,
examples are described by trid as "Text - UTF-8 encoded" (see appended
utf8/output/trid-old.txt) and by file(1) command as "UTF-8 Unicode (with
BOM) text" (see appended utf8/output/file-5.32.txt)
After some inspection i found that these examples have three additional bytes
0xEF,0xBB,0xBF at the beginning, which is the UTF-8 representation of the BOM
( see
https://en.wikipedia.org/wiki/Byte_order_mark ).
This is then expressed by XML construct:
<Pattern>
<Bytes>EFBBBF4A4153432D50414C0D0A303130300D0A</Bytes>
<ASCII> . . . J A S C - P A L . . 0 1 0 0</ASCII>
<Pos>0</Pos>
</Pattern>
So i create a second variant pal-jasc-utf8.trid.xml with above construct.
With this definition file Cyotek created palettes are now detected as "JASC
format palette file (UTF-8)" (See appended utf8/output/trid-new.txt). But
maybe this is a bug in Cyotek software because program version is declared
as beta. Furthermore Xnview version 2.40 does not accept UTF variant.
Furthermore palette mostly contains digits which can be expressed as
ASCII. So UTF coding is not really needed.
Furthermore i found more text and also binary color palettes with "pal"
extension with other formats ( see appended text_other/output/trid-old.txt)
TrID definitions, some examples and output are stored in archive JASC-PAL.zip .
I hope that my XML files can be used in future version of triddefs.
With best wishes
Joerg Jenderek