[File] [PATCH] Magdir/images Atari GED bitmap unrecognized
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Wed May 10 20:07:24 UTC 2023
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
some days ago i send patch to handle some genealogical database. One
format used filename extension ged. Unfortunately that suffix is also
used for other file formats. One such format is an Atari graphic
bitmap.
When running file command version 5.44 on such Atari graphic samples
i get an output like:
ACIDV2.GED: data
DRACONUS.GED: data
HUNTERS.GED: data
LOWCA.GED: data
MARTIAN.GED: data
SKODAFAV.GED: data
TEST.GED: data
TEST2.GED: data
With --extension option only ??? is displayed. Furthermore with
option -i for samples only generic application/octet-stream is shown.
For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). Here
the examples are also not recognized.
For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). The GED samples are
described as here with highest priority as "Atari GED bitmap" by
bitmap-ged.trid.xml (See appended trid-v-ged-atari.txt.gz).
TrID list the used file name extension and often with -v option the
related URL pointing to used file format information. With the help
of this tools i found a page about GED on file formats
archive team web site. There i found also links for downloading
samples and software RECOIL, which i used to verify the GED images.
In c source recoil.c i found information about starting bytes and
file size.
This is now expressed inside Magdir/images by additional comment
lines like:
# URL: http://fileformats.archiveteam.org/wiki/GED
# https://recoil.sourceforge.net/formats.html
# Reference: https://sourceforge.net/projects/recoil/files/recoil/
# 6.3.4/recoil-6.3.4.tar.gz/recoil-6.3.4/recoil.c
# http://mark0.net/download/triddefs_xml.7z
# defs/b/bitmap-ged.trid.xml
According to source i look for 6 byte starting magic. According to
formats.html on recoil website the resolution is always constant
160x200.
So the description is now done after Atari DEGAS entry and before
ImageLab bitmap inside Magdir/images by lines like:
0 string \xFF\xFF0SO\x7F Atari GED bitmap, 160x200
!:mime image/x-atari-ged
!:ext ged
The samples are just graphic bitmap images. So i apply an user
defined mime type instead of generic application/octet-stream.
After applying the above mentioned modifications by patch
file-5.44-images-ged.diff then all my Atari graphic examples are now
recognized. This now looks like:
ACIDV2.GED: Atari GED bitmap, 160x200
DRACONUS.GED: Atari GED bitmap, 160x200
HUNTERS.GED: Atari GED bitmap, 160x200
LOWCA.GED: Atari GED bitmap, 160x200
MARTIAN.GED: Atari GED bitmap, 160x200
SKODAFAV.GED: Atari GED bitmap, 160x200
TEST.GED: Atari GED bitmap, 160x200
TEST2.GED: Atari GED bitmap, 160x200
I hope my diff file can be applied in future version of file
utility.
Unfortunately there exist other file formats also using file name
suffix ged.
With best wishes,
Jörg Jenderek
- --
Jörg Jenderek
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCZFv5fAAKCRCv8rHJQhrU
1rQ2AJ9o2vK9BVb9F6T6I/CwVELrphEi8QCff+DS2/6kvut60pw3BBlykPmpIqk=
=DOtb
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-ged-atari.txt.gz
Type: application/x-gzip
Size: 710 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230510/1dbd3349/attachment.bin>
-------------- next part --------------
--- file-5.44/magic/Magdir/images.old 2022-11-30 00:04:06.000000000 +0100
+++ file-5.44/magic/Magdir/images 2023-05-10 21:57:05.078404400 +0200
@@ -1710,10 +1710,23 @@
#>32050 ubequad !0 \b, channel directions %16.16llx
# channel_delay[4]; 128 - channel delay, timebase 1/60 s
#>32058 ubequad !0 \b, channel delays %16.16llx
# From: Joerg Jenderek
+# URL: http://fileformats.archiveteam.org/wiki/GED
+# https://recoil.sourceforge.net/formats.html#Atari-8-bit
+# Reference: https://sourceforge.net/projects/recoil/files/recoil/6.3.4/recoil-6.3.4.tar.gz
+# recoil-6.3.4/recoil.c
+# http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-ged.trid.xml
+# Note: called "Atari GED bitmap" by TrID; file size 11302
+# and verified by RECOIL graphic tool
+0 string \xFF\xFF0SO\x7F Atari GED bitmap, 160x200
+#!:mime application/octet-stream
+!:mime image/x-atari-ged
+!:ext ged
+
+# From: Joerg Jenderek
# URL: http://fileformats.archiveteam.org/wiki/ImageLab/PrintTechnic
# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-b_w.trid.xml
# Note: called "ImageLab bitmap" by TrID
# verfied by XnView `nconvert -fullinfo "MAEDCHEN.B&W"`
0 string B&W256 ImageLab bitmap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.44-images-ged.diff.sig
Type: application/octet-stream
Size: 808 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230510/1dbd3349/attachment.obj>
More information about the File
mailing list