From 69d1615d7dc7500039dbde951fa6cbb920eb99b8 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 9 Oct 2010 21:20:13 +0200 Subject: Add support for squared thumbnails Disabled by default, only very simple center crop implemented. The SQUARED_SIMPLE_SHAVE_AMOUNT constant may be slightly adjusted according to future experience. It's a really dumb algorithm which may not be suitable for every picture. Looking for a fast and smart algorithm to determine image weight center and radius, i.e. focus on object of interest. The OpenCV's face recognition features are worth to test and consider, though I fear the speed issues. --- templates/styles.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'templates/styles.css') diff --git a/templates/styles.css b/templates/styles.css index 0a42f53..8c3aaf2 100644 --- a/templates/styles.css +++ b/templates/styles.css @@ -222,6 +222,11 @@ div.album_item img.portrait { padding-top: 1em; } +div.album_item img.squared { + /* squared */ + padding-top: 1em; +} + .album_thumb_text { /* CSS positioning sucks^2 */ position: absolute; @@ -347,6 +352,16 @@ div.index_item img { /* padding-right: 7.7em; disabled -- word wrap */ top: 0.65em; } + +.album_text_squared { + font-size: 190%; + font-weight: bold; + position: relative; + left: 10.3em; +/* padding-right: 10.5em; disabled -- word wrap */ + top: 0.65em; +} + .album_subtext { font-size: 150%; position: relative; @@ -363,6 +378,14 @@ div.index_item img { top: 2.5em; } +.album_subtext_squared { + font-size: 150%; + position: relative; + left: 13.1em; +/* padding-right: 13.4em; disabled -- word wrap */ + top: 2.5em; +} + .album_note { position: absolute; right: 2.3em; -- cgit v1.2.3