[File] [PATCH] of Magdir/images for oldest version of Corel Draw Picture *.cdr

Christos Zoulas christos at zoulas.com
Fri Feb 3 20:23:28 UTC 2023


Committed, thanks!

christos

> On Jan 28, 2023, at 10:06 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> some times ago (5 Jun 2020) i send patch Magdir/riff for older Corel
> Draw Picture, which often have file name suffix CDR. Now i get some
> older version of such Corel Draw Pictures.
> 
> When i run file command version 5.44 on such older Corel samples and
> related test samples i get an output like:
> 
> 911.CDR:                       RIFF (little-endian) data,
> 			       Corel Draw Picture,
> 			       version 3, 9094 bytes
> BEETHOV1.CDR:                  RIFF (little-endian) data,
> 			       Corel Draw Picture,
> 			       version '4' 4.4, 29714 bytes
> FLOWER.CDR:                    data
> fmt-464-signature-id-723.cdr:  RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '5', 8 bytes
> fmt-465-signature-id-722.cdr:  RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '4', 8 bytes
> fmt-466-signature-id-725.cdr:  data
> fmt-467-signature-id-726.cdr:  data
> x-fmt-29-signature-id-374.cdr: RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '6', 8 bytes
> 
> With option -i only generic application/octet-stream is shown for
> oldest version. Furthermore with --extension option only ??? is
> displayed for oldest version instead of cdr.
> 
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). The not oldest
> samples are described with low rate as "Generic RIFF container" by
> riff.trid.xml. With highest priority such samples are described as
> "CorelDraw Document" by cdr.trid.xml. The oldest version samples like
> FLOWER.CDR are described as "CorelDRAW drawing (generic)" by
> cdr-gen.trid.xml. Most oldest examples are described with highest
> priority as "CorelDRAW drawing (v2.0)" by cdr-corel-20.trid.xml. One
> of the oldest samples fmt-467-signature-id-726.cdr is described as
> "CorelDRAW drawing (v1.0)" by cdr-corel-10.trid.xml (See appended
> trid-v-corel_1-2.txt.gz).
> 
> For comparison reason i also run the file format identification
> utility DROID ( See https://sourceforge.net/projects/droid/). Here
> all CDR examples described as "CorelDraw Drawing". It does do also a
> sub classification. What is described by TrID as "CorelDRAW drawing
> (v1.0)" is described here with additional version "1.0" by PUID
> fmt/467. What is described by TrID as "CorelDRAW drawing (v2.0)" is
> described here with additional version "2.0" by PUID fmt/466 (See
> appended droid-cdr.csv.gz).
> 
> TrID list the used file name extension and often with -v option the
> related URL pointing to some information. So i found a page about
> CorelDRAW on file formats archive team website and on Wikipedia. This
> is now expressed by comment lines inside Magdir/images like:
> # URL:		http://fileformats.archiveteam.org/wiki/CorelDRAW
> #		https://en.wikipedia.org/wiki/CorelDRAW
> # Reference:	http://mark0.net/download/triddefs_xml.7z
> #		defs/c/cdr-gen.trid.xml
> #		defs/c/cdr-corel-10.trid.xml
> #		defs/c/cdr-corel-10.trid.xml
> 
> There i also found links to some file format informations.
> 
>> From version 3 Corel Draw Pictures are RIFF based. Such samples
>> are
> already handled by Magdir/riff. From version 14 the riff part is
> packed in a ZIP container. Such samples are already handled by
> Magdir/archive.
> 
> So this session is about the oldest versions (1 until 2). There exist
> an entry for other Corel images inside Magdir/images. So i add new
> entry after "Corel Photo-Paint image" entry and before "Crunch
> compressed texture" entry.
> 
> According to documentation such old pictures start with 2 byte phrase
> WL. According to TrID and DROID at offset 3 is a nil byte. The byte
> at offset 2 is letter e (0x6D) for version 1.0 and letter (0x6D) for
> version 2.0. The DROID tool checks also more bytes afterwards. IT
> assumes that for version 1.0 this is followed by byte sequence
> 0x45000000 and for version 2.0 this is 0xed080000 or 0x25050000.
> Instead of generic mime type application/octet-stream is use the type
> used by riff variant. So this additional lines now looks like:
> 
> 0 ubelong&0xFFffF7ff	0x574C6500	Corel Draw Picture
> !:mime					application/vnd.corel-draw
> !:ext					cdr
>> 2	ubyte		0x65		\b, version 1.0
> #>>4	ubelong		!0x45000000	\b, at 4 %#8.8x
>> 2	ubyte		0x6D		\b, version 2.0
> #>>4	ubelong		!0xed080000
> #>>>4	ubelong		!0x25050000	\b, at 4 %#8.8x
> 
> After applying the above mentioned modifications by patch
> file-5.44-images-cdr.diff and using also Magdir/riff then now also
> oldest version samples are described. So now this looks like:
> 911.CDR:                       RIFF (little-endian) data,
> 			       Corel Draw Picture,
> 			       version 3, 9094 bytes
> BEETHOV1.CDR:                  RIFF (little-endian) data,
> 			       Corel Draw Picture,
> 			       version '4' 4.4, 29714 bytes
> FLOWER.CDR:                    Corel Draw Picture,
> 			       version 2.0
> fmt-464-signature-id-723.cdr:  RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '5', 8 bytes
> fmt-465-signature-id-722.cdr:  RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '4', 8 bytes
> fmt-466-signature-id-725.cdr:  Corel Draw Picture,
> 			       version 2.0
> fmt-467-signature-id-726.cdr:  Corel Draw Picture,
> 			       version 1.0
> x-fmt-29-signature-id-374.cdr: RIFF (little-endian) data,
> 			       Corel Draw,
> 			       version '6', 8 bytes
> 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+v8rHJQhrU1gUCY9XinQAKCRCv8rHJQhrU
> 1sCoAJ42wpe5EXZmnxL5E6dGyT79iB1UgQCg21acbY6gHeOAYHmvfcvPODfuSu8=
> =KftH
> -----END PGP SIGNATURE-----
> <trid-v-corel_1-2.txt.gz><file-5_44-images-cdr_diff.DEFANGED-1710><file-5_44-images-cdr_diff_sig.DEFANGED-1711><droid-cdr.csv.gz>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20230203/95b44ef0/attachment.asc>


More information about the File mailing list