[Owncloud] thumbnails in gallery app
Software at quantentunnel.de
Software at quantentunnel.de
Sat Jan 14 15:42:32 UTC 2012
Hi
Thanks for your reply. I just downloaded from gitorious; in my hands, branch master does currently not rescan, likely work-in-progress. I look forward to the updated full / stable version.
While you are working on the thumbnails: I suggest to include the following line in apps/gallery/lib/scanner.php (patch file is attached):
natcasesort($current_album['images']);
This keeps the pictures in the thumbnail for folders and in the database sorted by filename, which is the natural order for most people when downloading images from cameras (where most often images are simply numbered).
Best
Al_
-------- Original-Nachricht --------
> Datum: Sat, 14 Jan 2012 14:46:19 +0100
> Von: Bartek Przybylski <bart.p.pl at gmail.com>
> An: Software at quantentunnel.de
> CC: owncloud at kde.org
> Betreff: Re: [Owncloud] thumbnails in gallery app
> hi!
> i wrote code for generation of thumbnails to data/user/gallery, but
> forgot to use those thumbnails in ownCloud3alpha1 ;) this error is
> repaired on master git branch and will be introduced into ownCloud
> Beta and Full
>
> bartek
>
> 2012/1/14 <Software at quantentunnel.de>:
> > Hi
> >
> > Thumbnails in the gallery app are very slow to appear, as also listed on
> the bug tracker. There is also an issue with images that are recognized by
> their mime types, but not handled by the thumbnail creator routines (e.g.,
> bmp are not handled). I looked into the code, hoping that I find a way to
> improve.
> >
> > What struck me: the code to create thumbnails for folder display (i.e.,
> 10 thumbnails next to each other) is duplicated in
> apps/gallery/lib/images_utils.php and apps/gallery/ajax/getCovers.php
> >
> > images_utils.php is called when rescanning and creates pre-rendered
> thumbnails as data/username/gallery/*.png (which makes sense as rendering takes
> a long time).
> > getCovers.php is called when folders are shown on the client's webpage;
> the code does not seem to use the pre-rendered thumbnails but creates new
> thumbnails each time.
> >
> > Can somebody explain me the reasoning behind this design?
> >
> > Best
> >
> > Al_
> > --
> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > _______________________________________________
> > Owncloud mailing list
> > Owncloud at kde.org
> > https://mail.kde.org/mailman/listinfo/owncloud
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
-------------- next part --------------
commit 85f50307c96dd9b4ada5fa46eb01c6b8e3aeb678
Author: <software at quantentunnel.de>
Date: Sat Jan 14 16:34:44 2012 +0100
sorting of images prior to thumbnail creation
modified: apps/gallery/lib/scanner.php
diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php
index 3eba926..a4eee6e 100644
--- a/apps/gallery/lib/scanner.php
+++ b/apps/gallery/lib/scanner.php
@@ -57,6 +57,7 @@ class OC_Gallery_Scanner {
}
}
}
+ natcasesort($current_album['images']);
$current_album['imagesCount'] = count($current_album['images']);
$albums[] = $current_album;
More information about the Owncloud
mailing list