Opened 10 years ago

Closed 9 years ago

#7376 closed patch (wontfix)

MythGallery image sorting by creation time and automatic rotation by exif header information

Reported by: trebor_s@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: Plugin - MythGallery Version: head
Severity: low Keywords: gallery sort exif header rotation creation time
Cc: Ticket locked: no

Description

Hello everybody,

I have created a patch for the mythgallery plugin in mythtv trunk 22544. It allows one to sort and show the images in the gallery not just by name or mod time, but by the actual creation time that is saved in the exif header. This is very usefull when you have more than one camera and they name the files differently (like img_*.jpg and dsc_*.jpg) and you want to show the images sorted by their creation time to have a correct cronologically ordered image gallery.

I have also incorporated the automatic rotation of the images according to their information in the exif header. If you have made an image with your camera upright, then the thumbnails and fullscreen images will also be created and displayed upright in mythgallery. No need to manually rotate the image anymore.

Changes due to the patch are:

  • Restructured some methods to allow object oriented reuse.
  • New setting to sort the images by creation time (earliest or latest first).
  • Added a column in the gallermetadata that saves the creation time for faster lookup. Saving this information really speeds up the image loading because the time information needs to be extracted only once. (This might take a while for the first time!)
  • Files that have no creation time in their header will be sorted the old way and shown at the end alphabetically.
  • The rotation angle will be also saved in the database. So everytime the image is displayed it is correctly shown.

Try it out!

Best regards

Robert

Attachments (3)

mythgallery.rev22544.patch (27.5 KB) - added by trebor_s@… 10 years ago.
Patch for mythgallery against trunk 22544
mythgallery.2009.10.21.rev22544.patch (30.1 KB) - added by trebor_s@… 10 years ago.
New patch with improvements and fixes
mythgallery-sort-by-exif-header-with-progressdialog.patch (32.9 KB) - added by Robert S 9 years ago.
New patch against trunk 24870

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by trebor_s@…

Attachment: mythgallery.rev22544.patch added

Patch for mythgallery against trunk 22544

comment:1 Changed 10 years ago by robertm

Milestone: 0.22unknown

comment:2 in reply to:  1 Changed 10 years ago by trebor_s@…

I have added a new patch that fixes a couple of things that were left in the previous patch. I have also added the option in the settings to view the images fully zoomed. Also cleaned up the code and removed the small visible borders around the image in full screen mode.

Changed 10 years ago by trebor_s@…

New patch with improvements and fixes

comment:3 Changed 10 years ago by robertm

Status: newinfoneeded_new

Robert,

Thanks for this patch-- You made a lot of whitespace and formatting changes that don't have anything to do with the patch/new feature, though, which makes it confusing and difficult to review. Can you update only with new code changes?

comment:4 Changed 10 years ago by robertm

Resolution: wontfix
Status: infoneeded_newclosed

No response.

comment:5 in reply to:  4 Changed 9 years ago by Robert S

Resolution: wontfix
Status: closednew

Even though the ticket is closed I'll reopen it with a newer patch. Maybe this will be reconsidered for inclusion into trunk. If there are any changes required to the patch please inform me.

This patch is pretty much the same as the old one. Additionally it adds a progressbar dialog when the user enters a directory with more than 25 files. The dialog shows the loading progress of the files. This is a useful information to the user because it will take some time to read the exif information from each file and write it to the database. But once the data is in the database the loading is a lot faster.

Robert S

Changed 9 years ago by Robert S

New patch against trunk 24870

comment:6 Changed 9 years ago by robertm

Resolution: wontfix
Status: newclosed

Robert,

The patch you have attached does not address any of the requests made several months ago with the initial patch-- additionally, it undoes one of the fixes made recently to exif rotation handling. I am reclosing, please *only* reopen with a ticket that removes the unnecessary formatting and whitespace changes, and one which does not revert fixed applied.

Note: See TracTickets for help on using tickets.