Page 1 of 1

Categories database

Posted: Thu Oct 05, 2006 12:26 pm
by markus.angerer
Hi,

I really like the new categories function in version 1.90! Something that would be nice to have is an Import/Export function for the database so that I could fix invalid filenames in case I moved or renamed the original files.

This would also be handy then moving to another computer that has the same images in a different folder and I don't want to redo the whole categories assignment.

I don't know how complex the database structure in category.db is but either a simple textfile, XML or an Mirosoft Access database would be great.

best regards, Markus


PS. probably same with the ratings. It would be nice if that information could be edited manually and transferred to other PCs.

XnView 1.90

Posted: Fri Oct 06, 2006 7:30 am
by nightflyer
Database import and export are very important- for correcting database and interoperation with other tools.
The best way is XML, there are free programmer's tools for that.

Posted: Fri Oct 06, 2006 9:00 am
by xnview
nightflyer wrote:Database import and export are very important- for correcting database and interoperation with other tools.
The best way is XML, there are free programmer's tools for that.
Do you know free programmer tools?

Posted: Mon Oct 09, 2006 8:06 am
by nightflyer
I've seen library from this project:
http://xml.apache.org/xerces-c/
in many applications.
Starting page for XML:
http://www.w3.org/XML/

Posted: Mon Oct 09, 2006 6:07 pm
by Olivier_G
While working on XML import/export, please do consider XMP synchronisation with images, as described here.
It may be quite useful (merging Categories management with XMP/IPTC editing).

Posted: Tue Oct 10, 2006 8:33 am
by nightflyer
It is absolutely different matter!
This XML thread is about easy database interoperation.
XMP is about describing images!

Posted: Thu Oct 12, 2006 12:05 am
by Olivier_G
nightflyer wrote:It is absolutely different matter!
XML and XMP are about data content and are quite similar. My thread was to emphasize the fact that it is possible to synchronise internal DB and Metadata XMP.
I am just asking to keep that in mind while formating the XML Import/Export in order to avoid future issues... nothing more.
I am not asking to implement XMP at the same time... and I agree that my post was slightly out of topic, just slightly. :wink:

edit: I see that my "do consider" was quite vague. Should have said "keep in mind"

Posted: Fri Dec 15, 2006 12:30 pm
by Olivier_G
XML Import/Export not implemented so far -> Postponed.

Posted: Tue May 22, 2007 12:00 am
by asmodean
Hi, I registered here to suggest this very thing, but I bothered to search first and found this thread :). I will instead register my agreement with markus.angerer that import/export is a necessity!

Categorizing large amounts data may be a non-trivial investment of time and effort. Many users, myself included, will not do so unless they are sure that the data will not be locked up in a proprietary database. The meta-data needs to be import/export-able to a reasonably neutral format (text/XML/etc) so that it can be moved between applications if necessary.

[This is also a good backup format in case of database corruption.]

I currently use a product called ACDSee which has supported database information for a while. It has a mechanism to import/export the complete database to XML. When I saw XNView had categories now, the first thing I did was hunt around for a way to import data into it, with the intention to export my ACDSee data, convert it to XNView's import format, then importing.

So not having such a feature was disappointing. Since I am experienced reverse engineering data formats, I have been considering writing my own import/export tool for XNView's database ... If you have documentation about the structure you'd like to share, that would be nice.

By the way, in terms of "free xml software", I recommend looking into LibXML2 and LibXML++. These are very functional straightforward XML parsing/producing libraries licensed I believe under LGPL.

Posted: Tue May 22, 2007 12:30 am
by asmodean
The import/export can also be useful for you as the XnView developer. If you ever need to modify the database, it could be very painful to be backwards compatible or support migration tools.

If you have generic import/export, then the strategy could be for users to export from the old version before upgrade -- then import into the new version.

Posted: Wed Jun 06, 2007 2:19 pm
by markus.angerer
Hi, I've just seen that my thread is still read after that time.

In the meanwhile I found out that the xnview categories database is a SQLite Db which can easily be edited. For a test I used the SQLite ADO.NET 2.0 Provider (http://sourceforge.net/projects/sqlite-dotnet2) which worked perfectly. Even with no database model it is pretty logical to understand that the tables/fields are meant for - still it would be nice if a short description on the db can be made available. Especially in case that changes are made from one version to the next...

For my testing I used MS Visual Studio .NET 2005 at work as it also provides easy functions for XML export. (Visual Sudio Express may also do the job?!) So this would be everything I need but I gave up categorizing in xnview for the moment because of the extremly poor performance of the database when categorizing images.

A little off topic now: I've tried to put 1400 images taken at a 5 megapixel resolution into subsets with around 12 different categories making around 10000 images at all. It takes up to 20 minutes when I try to remove images, 1 minute just to show the images in a category. Starting xnview in the original file system folder to view a single picture also takes 15 seconds before showing the image.
Is this a problem only on my machines or does somebody else experience the same problems? (Hardware is a PentiumD 820, 1 GB Ram).

regards, Markus

Posted: Wed Jun 06, 2007 3:44 pm
by xnview
markus.angerer wrote: A little off topic now: I've tried to put 1400 images taken at a 5 megapixel resolution into subsets with around 12 different categories making around 10000 images at all. It takes up to 20 minutes when I try to remove images, 1 minute just to show the images in a category. Starting xnview in the original file system folder to view a single picture also takes 15 seconds before showing the image.
Is this a problem only on my machines or does somebody else experience the same problems? (Hardware is a PentiumD 820, 1 GB Ram).
20min with the 1.91??

Posted: Wed Jun 06, 2007 5:04 pm
by markus.angerer
Sorry, I didn't check for the latest update before complaining! It was 1.90.3 and I just upgraded to 1.91 and it's a lot faster nwo when removing images from a category: 20 sec instead of 20 min!

Markus

Re: Categories database

Posted: Mon Apr 06, 2009 11:31 am
by marcoswat
I think this is useful too