goldendict/goldendict — comment on commit 78d99234524da41aed533224ee2b7efb61ea6749
File:  line 0
By chulai:

Hello Abs62, how are you doing?

I just found out that you have improved the image support on xdxf dictionaries. That's great news!
There is a pull request from 4 months ago that tries to add image support to stardict:
https://github.com/goldendict/goldendict/pull/58

Because the user tindzk mixed several unrelated commits in that pull he later created a branch on his own repo:
https://github.com/tindzk/goldendict/commits/stardict-images

If you read the discussion on the pull request, his changes involve 2 things:

1) Prepending "res" to all image paths. This is because lot of dictionaries (if not all) don't include that on the images references. Probably because the resources in Startdict format must be either in a resource database file or a "res" subfolder.

2) Some image tags are like . So the changes are trimming out those control characters "\x1E" and "\x1F".

As you might know, Stardict format supports xdxf language. He added support only for images in that data type (sametypesequence=x).

But you can see in the Type identifiers section of the official format documentation that there are other data types supported by Stardict:
http://code.google.com/p/babiloo/wiki/StarDict_format

I have 5 Startdict dictionaries with images for testing purposes: 4 use html for content and 1 uses xdxf markup.

With tindzk's code I can see the images only on the xdxf stardict file.
With your code I cannot see images on any of the 5 files!

* Can you check your code and tindzk's code? I wonder if you can take advantage of his improvements or not.
* Can you add support for resources to other stardict data types such as 'h' (html) and 'r' (resource file list)?

I will be more than glad to share the sample Startdict dictionaries with you.

Thanks