[File] [PATCH] Magdir/images for GIF alike versus JPEG *.JIF

Jörg Jenderek joerg.jen.der.ek at gmx.net
Sun Feb 27 19:07:27 UTC 2022


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

some days ago i handled some JPEG pictures. In many cases the JPEG
or JPG file name extension is used. But also extensions like jfif,
jfi or jif are mentioned on some sites. So i looked for such examples
.

When running file command version 5.41 on such images and
related files get an output like:

download-2.jfif_.jpeg: JPEG image data, JFIF standard 1.01,
		       aspect ratio, density 1x1,
		       segment length 16, baseline, precision 8,
		       275x184, components 3
fdosfish.jif:          data
paint-1.jif:           JPEG image data, JFIF standard 1.01,
		       resolution (DPI), density 144x144,
		       segment length 16, Exif Standard:
		       [TIFF image data, little-endian, direntries=2,
		       datetime=2022:01:25 14:23:20],
		       baseline, precision 8,
		       764x629, components 3
sample1.jfif:          JPEG image data, JFIF standard 1.01,
		       aspect ratio, density 1x1,
		       segment length 16, baseline, precision 8,
		       1024x512, components 3

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). This identifies also
all JPEG samples generic as "JPEG bitmap" by bitmap-jpeg.trid.xml.
The undetected example fdosfish.jif is described as "Jeff's Image
Format bitmap" by bitmap-jif.trid.xml (See appended jif_trid-v.txt).

For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). This
identifies all JPEG examples as "JPEG File Interchange Format"
by PUID fmt/43, but it complains about the samples with file name
extension jfif and is only satisfied about examples with jpeg file
name extension. The undetected example is described as "Jeffs Image
Format" by PUID fmt/994. (See appended jif_droid.csv.gz)

With the information of these 2 tools i found a page about "Jeff's
Image Format" on file formats archive team web site. That
informations are expressed by comment lines inside
Magdir/images like:
# URL:	http://fileformats.archiveteam.org/wiki/Jeff%27s_Image_Format
#	http://web.archive.org/web/20010603113404/
#	http://jeff.cafe.net/jif
# Reference:
#http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jif.trid.xml
#https://www.nationalarchives.gov.uk/PRONOM/fmt/994

According to that site Jeff's Image Format (JIF) is a raster image
file format that was designed to be a patent-free alternative to GIF.
It is nearly identical to GIF, except that it uses zlib compression
instead of LZW. Furthermore there also software is mentioned that can
handle such file format. One Software is XnView.So i verified such
examples by command like:
	nconvert -fullinfo *.jif

According to documentation it is a "J"-ivied GIF alike ( Use letter
J instead of G). So i add magic lines after GIF entry inside
Magdir/images. These additional lines look like:

 0	string		JIF99a		Jeffs Image Format data
 !:mime	image/x-jif
 !:apple	????JIFf
 !:ext	jif
 >6	uleshort	x		%u x
 >8	uleshort	x		%u

On Web sites like extension.nirsoft.net mime type image/jif is
mentioned, but i do not found such an official registered type. So i
choose an user defined one.

After applying the above mentioned modifications by patch
file-5.41-images-jif.diff and using Magdir/jpeg
then all my inspected jpeg images are stile described and JIF
example is now also described. This now looks option like:

download-2.jfif_.jpeg: JPEG image data, JFIF standard 1.01,
		       aspect ratio, density 1x1,
		       segment length 16, baseline, precision 8,
		       275x184, components 3
fdosfish.jif:          Jeffs Image Format data 320 x 200
paint-1.jif:           JPEG image data, JFIF standard 1.01,
		       resolution (DPI), density 144x144,
		       segment length 16, Exif Standard:
		       [TIFF image data, little-endian, direntries=2,
		       datetime=2022:01:25 14:23:20],
		       baseline, precision 8,
		       764x629, components 3
sample1.jfif:          JPEG image data, JFIF standard 1.01,
		       aspect ratio, density 1x1,
		       segment length 16, baseline, precision 8,
		       1024x512, components 3

I hope my diff file can be applied in future version of file
utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCYhvL5wAKCRCv8rHJQhrU
1qAdAJ0eL+UKSNJ+K8pWoMqE86/wJdMMcACfRBu4Kmhbytncmozm0MV3pXBZYOw=
=ybBN
-----END PGP SIGNATURE-----
-------------- next part --------------
-- 
File mailing list
File at astron.com
https://mailman.astron.com/mailman/listinfo/file

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jif_trid-v.txt.gz
Type: application/x-gzip
Size: 589 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220227/2d14ef86/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jif_droid.csv.gz
Type: application/x-gzip
Size: 381 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220227/2d14ef86/attachment-0001.bin>
-------------- next part --------------
--- file-5.41/magic/Magdir/images.old	2021-10-18 16:20:03.000000000 +0200
+++ file-5.41/magic/Magdir/images	2022-02-27 19:33:47.786183400 +0100
@@ -544,6 +544,23 @@
 #>10	byte&0x07	=0x06		128 colors
 #>10	byte&0x07	=0x07		256 colors
 
+# URL:		http://fileformats.archiveteam.org/wiki/Jeff%27s_Image_Format
+#		http://web.archive.org/web/20010603113404/http://jeff.cafe.net/jif
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/b/bitmap-jif.trid.xml
+#		https://www.nationalarchives.gov.uk/PRONOM/fmt/994
+# From:		Joerg Jenderek
+# Note:		nearly identical to GIF, except that it uses zlib compression instead of LZW
+#		called by TrID "Jeff's Image Format bitmap" and "Jeffs Image Format" by DROID
+#		verfied by XnView `nconvert -fullinfo *.jif`
+0	string		JIF99a		Jeffs Image Format data
+!:mime	image/x-jif
+# http://extension.nirsoft.net/jif
+#!:mime	image/jif
+!:apple	????JIFf
+!:ext	jif
+>6	uleshort	x		%u x
+>8	uleshort	x		%u
+
 # ITC (CMU WM) raster files.  It is essentially a byte-reversed Sun raster,
 # 1 plane, no encoding.
 0	string		\361\0\100\273	CMU window manager raster image data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.41-images-jif.diff.sig
Type: application/octet-stream
Size: 854 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220227/2d14ef86/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fdosfish.jif.bz2
Type: application/octet-stream
Size: 8272 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220227/2d14ef86/attachment-0001.obj>


More information about the File mailing list