Bug 127888 - Images not sorted in HTML Album Export
Summary: Images not sorted in HTML Album Export
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-HTMLGallery (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-23 17:13 UTC by Mark Ovens
Modified: 2017-06-30 05:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Ovens 2006-05-23 17:13:07 UTC
Version:           0.1.0.r1 (using KDE KDE 3.5.2)
Installed from:    FreeBSD Ports
Compiler:          gcc 3.4.4 [FreeBSD] 20050518 
OS:                FreeBSD

I've noticed that when I use the HTML Album Export plugin from kipi-plugins (0.1.0.r1_3,1) with digikam (0.8.1_2) that the output (i.e. the order of the images on the index page) is not sorted properly, either by date or filename.

After some investigation I've found out why. My camera (Canon Powershot A70) reuses the "holes" left by deleted files on the CF card if there are any so, for example, I take 4 pictures, delete the second, then take 2 more pictures. The pictures are stored 1 5 3 4 6 and that is the order they appear in digikam when connected to the camera and also the order in which digikam d/ls them from the camera.

This isn't a problem in digikam itself as you can choose the sort order in the display window,  but the files are stored in the digikam.db files in d/l order - 1 5 3 4 6 - and the HTML Album Export seems to use the order in digikam.db when creating the HTML index page.

There appears to be no way to change the order that HTML Album Export uses and the only workaround I've come up with is to create a new album, display the pictures in the desired sort order, then copy them to the new album - digikam appears to copy them in the order they are sorted.

It seems that either pictures should be sorted by date or filename when creating the HTML index page or, better still, you should be able to choose the sort order. Either that, or digikam should save the filenames in digikam.db in date or name order.
Comment 1 Angelo Naselli 2006-05-23 18:44:10 UTC
Just a curiosity, if you use kameraclient from another host application
(e.g. gwenview) and use HTML Export always there what do you optain?
Comment 2 Mark Ovens 2006-05-25 15:27:11 UTC
I've installed gwenview and it lists the files on the camera, and downlaods them in the correct (date/name) order - althought it doesn't show thumbnails, just the filenames arranged *vertically*, like this:
  I
  M
  G
  _
  1
  1
  5
  0
  JP
  G

Does this mean that the bug is actually in digikam? I wasn't sure whether it was digikam or kipi, but kipi seem the most likely culprit.
Comment 3 Mark Ovens 2006-05-25 15:44:51 UTC
Forgot to mention in the pervious comment that when I run Export HTML Album on the same directory as digikam that the index page _is_ created in the correct order. So I guess that it is a digikam problem?
Comment 4 Angelo Naselli 2006-05-26 09:55:07 UTC
Aurelien and digikam developers any comment? 
Comment 5 caulier.gilles 2006-05-26 12:34:09 UTC
Witch digiKam release you use exactly ?

Gilles
Comment 6 Mark Ovens 2006-05-26 13:31:27 UTC
> Witch digiKam release you use exactly ?

0.8.1 built from the FreeBSD ports.
Comment 7 Angelo Naselli 2006-06-02 23:29:07 UTC
Gilles do you think it's a digikam's problem?
Comment 8 Mark Ovens 2006-06-09 19:02:00 UTC
I suspect now that it may well be a digikam bug.

I reformatted the CF card in my camera, took some photos and when I connected it to digikam the thumbnails were displayed with the last pic first and the first pic last, but all th others in the correct order, e.g.

IMG_009, IMG_002, IMG_003, ..... IMG_008, IMG_001

but as the thumbnails were being created it did so in the correct order, i.e. IMG_001 was first and IMG_009 last.

gwenview lists them in the correct order as do several Windows apps. Digikam appears to be the only thing that get's it wrong.

Comment 9 caulier.gilles 2006-09-14 22:44:40 UTC

*** This bug has been marked as a duplicate of 134037 ***
Comment 10 caulier.gilles 2017-06-30 05:47:09 UTC
With new HTML Gallery tool from digiKam core, this problem is not reproducible.

Gilles Caulier