Categories database
Moderators: helmut, XnTriq, xnview
-
- Posts: 3
- Joined: Thu Oct 05, 2006 12:15 pm
Categories database
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
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
-
- Posts: 98
- Joined: Tue Sep 26, 2006 7:41 am
-
- Posts: 98
- Joined: Tue Sep 26, 2006 7:41 am
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/
http://xml.apache.org/xerces-c/
in many applications.
Starting page for XML:
http://www.w3.org/XML/
-=nightflyer=-
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).
It may be quite useful (merging Categories management with XMP/IPTC editing).
Olivier
-
- Posts: 98
- Joined: Tue Sep 26, 2006 7:41 am
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.nightflyer wrote:It is absolutely different matter!
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.

edit: I see that my "do consider" was quite vague. Should have said "keep in mind"
Olivier
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.

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.
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.
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.
-
- Posts: 3
- Joined: Thu Oct 05, 2006 12:15 pm
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
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
20min with the 1.91??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).
Pierre.
-
- Posts: 3
- Joined: Thu Oct 05, 2006 12:15 pm
Re: Categories database
I think this is useful too