Page 1 of 1

Thumbnails for Corel files are wrong

Posted: Thu Mar 27, 2014 5:59 am
by m.Th.
The thumbnails for Corel Draw and Corel Photo-Paint are wrong.

It seems that for both programs XnView MP uses the 1st thumbnail which generates for all other files.

XnView MP screenshot:
Corel-XnView.jpg
Explorer screenshot:
Corel-Explorer.jpg
Corel-Explorer.jpg (37.45 KiB) Viewed 2153 times
Also rescale/resample the thumbs in order to show them at the dimensions of XnView's thumbnail.

Re: Thumbnails for Corel files are wrong

Posted: Thu Mar 27, 2014 12:38 pm
by xnview
On XnView classic, do you have same thing?

Re: Thumbnails for Corel files are wrong

Posted: Thu Mar 27, 2014 1:07 pm
by m.Th.
xnview wrote:On XnView classic, do you have same thing?
No, but Xnview Classic crashed when it entered in that folder. Do you want the samples?

Re: Thumbnails for Corel files are wrong

Posted: Thu Mar 27, 2014 2:32 pm
by xnview
I don't read corel thumbnail so i think that shell extension from corel is used here
But you can send me some samples to be sure?

Re: Thumbnails for Corel files are wrong

Posted: Thu Mar 27, 2014 6:00 pm
by m.Th.
xnview wrote:I don't read corel thumbnail so i think that shell extension from corel is used here
But you can send me some samples to be sure?
Samples sent. Do you want the corresponding BMP/PNGs to see what it should look?

Re: Thumbnails for Corel files are wrong

Posted: Sat Mar 29, 2014 6:40 am
by m.Th.
In fact, Corel files are just RIFF files: http://en.wikipedia.org/wiki/Resource_I ... ile_Format

The code to read them is here:

http://sourceforge.net/projects/uniconvertor/

A part of UniConvertor is CDR explorer which reads the file:

http://sk1project.org/modules.php?name= ... drexplorer

See it in action at:

http://sk1project.org/images/index/sword.png

We need just the DISP chunk - see here:
http://sk1project.org/content/others/images/pict010.png

Re: Thumbnails for Corel files are wrong

Posted: Sat Mar 29, 2014 6:45 pm
by XnTriq
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=26341#p26341]Extra Plugins[/url]) wrote:The “CDRCvrsn” string indicates that these are actually CorelDRAW files.
corion.net ([url=http://web.archive.org/web/*/http://www.corion.net/cgi-bin/wiki.cgi/display/Format:RIFF]Wiki | FileFormats | RIFF[/url]) wrote:The RIFF (Resource interchange file format) format was created by Microsoft and is used by many applications like Windows, Corel Draw etc.. It is block structured, each block has a header ID and a size, so that even a program that works with an old version of the file format can skip the unknown parts of the file and work on the known parts of the file. All RIFF blocks begin on a word boundary so it might be necessary to skip an additional byte. In the present specification, only one RIFF block per file is allowed, and only the RIFF and LIST blocks may contain subblocks.
You'll find a “RIFF” signature in the headers of .ANI (Animated Cursor), .AVI (Video for Windows), .PAL (Microsoft Palette), .WAV (Wave Form), but also .CDR (CorelDRAW), .CLK (Corel R.A.V.E.) and .CMX (Corel Presentation Exchange) files, if you view them in hex mode.

Related threads on this forum:
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=69922#p69922]Catch O' The Day[/url]) wrote:
Wikipedia (sK1 » [url=http://en.wikipedia.org/wiki/SK1_(program)#Supported_formats]Supported formats[/url]) wrote:In 2007 the sK1 team reverse-engineered the CDR format. The results and the first working snapshot of CDR importer were presented at Libre Graphics Meeting 2007 conference taking place in May 2007 in Montreal (Canada). Later on the team parsed the structure of other Corel formats with the help of CDR Explorer. Now sK1 has the best importer of CorelDRAW file formats among open source software.
sk1project.org ([url=http://www.sk1project.org/modules.php?name=Products&product=cdrexplorer]CDR Explorer[/url]) wrote:CDR Explorer is a research tool for CorelDraw file formats. It was used to create a CDR import filter for sK1 Editor and UniConvertor. This tool is written on Python and works under Linux, MacOS X and Win32. Preview works for all types of cdr, cdrx, cdt and cmx files.
SourceForge.net SCM Repository: UniConvertor » /formats/CDR/cdr_explorer/src/