[File] [PATCH] of Magdir/riff for older Corel DESIGNER graphics *.des
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Fri Jun 26 15:50:49 UTC 2020
Hello,
some weeks ago i send patches for older Corel Drawings, which are
RIFF based. Later i run file command version 5.39 on older RIFF
based Corel DESIGNER graphics with name extension des, cdr, or dat.
With -m Magdir/riff options i get an output like:
cdraw2020-10.5.des: RIFF (little-endian) data
cdraw2020-10.des: RIFF (little-endian) data
cdraw2020-12.des: RIFF (little-endian) data
14-des-riffData.cdr: RIFF (little-endian) data
15-des-riffData.cdr: RIFF (little-endian) data
16-des-root.dat: RIFF (little-endian) data
17-des-root.dat: RIFF (little-endian) data
19-des-root.dat: RIFF (little-endian) data
20-des-root.dat: RIFF (little-endian) data
21-des-root.dat: RIFF (little-endian) data
All samples are at least general described by Magdir/riff with line
0 string RIFF RIFF (little-endian) data
but sub type classification is missing. Furthermore with --extension
option only ??? is displayed.
A few information can be found on Corel Designer page on Wikipedia.
So i add a comment line:
# URL: https://en.wikipedia.org/wiki/Corel_Designer
Some information about such Corel DESIGNER graphics is found on
file formats archive team website. That is now expressed by comment
line like:
# URL: http://fileformats.archiveteam.org/wiki/Corel_Designer
Many facts observed for Corel Drawing also apply for Designer graphics.
According to documentation the last character of second riff chunk is
a version indicator.
Most samples start with upcased phrase DES. So additional second test
line becomes like:
>8 string DES
To handle exception i put displaying part inside a sub routine called
corel-draw.
Unfortunately i was not able to distinguish Corel Draw templates with
version 12.5 from Corel Designer illustration 12. So i create a dead
branch for such Designer version by lines like
>>8 string =DESC
# MORE TESTS NEEDED HERE!
#>>>0 use corel-des
#>>>0 use corel-draw
All other designer versions are handled by lines
>>8 string !DESC
>>>0 use corel-des
The data chunk and meaning remain proprietary. So maybe an corel
expert knows about differences or more characteristics.
Later in subroutine i show version information by lines
>11 string x \b, version '%-.1s'
Similar to Corel Drawing the version is stored later in numeric form,
but exception are first older versions with unlogical relation
'A'~11.4 'B'~12 'C'~12.5
So display version information since version 'E', that is numeric
number 14 by lines
>11 string >D
>>0 use corel-version
For files with version 14 and higher the RIFF based part is packed in
a ZIP archive.
For version 14 and 15 the filename seems to be always be riffdata.cdr.
For files with version 16 and higher the file name seems to be always
be root.dat.
So the filename extension depends on file format version.
This is done by lines like
0 name corel-des
>12 string x \b, Corel DESIGNER
>12 string =fver graphics (root.dat)
!:ext dat
>12 string !fver
>>11 string >D graphics (riffData.cdr)
!:ext cdr
>>11 string <E graphics
!:ext des
A user defined mime type is shown by line
!:mime image/x-corel-des
After applying the above mentioned modifications by patch
file-5.39-riff-des.diff then nearly all different versions are
identified and i get a more precise output like:
cdraw2020-10.5.des: RIFF (little-endian) data,
Corel DESIGNER graphics,
version 'B', 51810 bytes
cdraw2020-10.des: RIFF (little-endian) data,
Corel DESIGNER graphics,
version 'A', 51704 bytes
cdraw2020-12.des: RIFF (little-endian) data
14-des-riffData.cdr: RIFF (little-endian) data,
Corel DESIGNER graphics (riffData.cdr),
version 'E' 14.10, 1536 bytes
15-des-riffData.cdr: RIFF (little-endian) data,
Corel DESIGNER graphics (riffData.cdr),
version 'F' 15.10, 1536 bytes
16-des-root.dat: RIFF (little-endian) data,
Corel DESIGNER graphics (root.dat),
version 'G' 16, 1200 bytes
17-des-root.dat: RIFF (little-endian) data,
Corel DESIGNER graphics (root.dat),
version 'H' 17, 1200 bytes
19-des-root.dat: RIFF (little-endian) data,
Corel DESIGNER graphics (root.dat),
version 'I' 19, 1200 bytes
20-des-root.dat: RIFF (little-endian) data,
Corel DESIGNER graphics (root.dat),
version 'J' 20, 1200 bytes
21-des-root.dat: RIFF (little-endian) data,
Corel DESIGNER graphics (root.dat),
version 'K' 21, 1200 bytes
I hope my diff file can be applied in future version of
file utility.
There exist also some other RIFF based file format used by Corel.
I will try to handle these in a future session.
With best wishes
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
--- file-5.39/magic/Magdir/riff.old 2020-06-15 00:01:01 +0000
+++ file-5.39/magic/Magdir/riff 2020-06-26 14:00:03 +0000
@@ -149,2 +149,13 @@
>>0 use corel-draw
+# From: Joerg Jenderek
+# URL: https://en.wikipedia.org/wiki/Corel_Designer
+# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer
+>8 string DES
+>>8 string !DESC
+>>>0 use corel-des
+# Corel Draw templates with version 12.5 or Corel Designer illustration 12
+>>8 string =DESC
+# MORE TESTS NEEDED HERE!
+#>>>0 use corel-des
+#>>>0 use corel-draw
>8 string NUNDROOT \b, Steinberg CuBase
@@ -360,2 +371,32 @@
>>>33 ubyte >0 \b.%u
+# display information of RIFF based Corel Design formats
+0 name corel-des
+# display second chunk for debugging
+#>8 string x \b, [8]=%.8s
+>12 string x \b, Corel DESIGNER
+!:mime image/x-corel-des
+#!:mime application/x-vnd.corel.designer.document
+# used by Corel Designer with newer versions since 16
+>12 string =fver graphics (root.dat)
+!:ext dat
+# used by Corel Designer templates with older versions with vrsn tag
+>12 string !fver
+# used by Corel Designer with versions 14-15
+>>11 string >D graphics (riffData.cdr)
+!:ext cdr
+# used by Corel Designer with versions 10-12
+>>11 string <E graphics
+!:ext des
+# version indicated by last ASCII char of second chunk tag
+>11 string x \b, version '%-.1s'
+# but vrsn short content is not always version indicator
+# exceptions: 'A'~11.4 'B'~12 'C'~12.5
+>11 string >D
+>>0 use corel-version
+# for debugging purpose display next chunk like: DISP LIST
+#>>22 string x \b, 4th "%-4.4s"
+#>>26 ulelong x \b, 4th SIZE 0x%x
+# for debugging purpose display 5th chunk like: LIST osfp
+#>>(26.l+30) string x \b, 5th "%-4.4s"
+>4 ulelong+8 x \b, %u bytes
#
More information about the File
mailing list