[File] [PATCH] of Magdir/riff for older Corel DESIGNER graphics *.des

Christos Zoulas christos at zoulas.com
Fri Jun 26 16:51:17 UTC 2020


Committed thanks,

christos

> On Jun 26, 2020, at 11:50 AM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> 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
> 
> 
> <file-5_39-riff-des_diff.DEFANGED-71>--
> 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/20200626/1f8a2f5b/attachment.asc>


More information about the File mailing list