From ddd9556689af055355a07cf2766fe95eaed4e38e Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 2 Oct 2016 16:58:27 +0200 Subject: Add support for HiDPI images This works by creating corresponding hidpi image sizes on startup and letting the machinery generate high resolution images from the source images (no way to use supplied images). However since browsers expect exact image dimension multiples for the particular scale factor, a reference image size (scale factor 1.0x) must be read first, then cropped to match reference aspect ratio and resized to exact dimensions. That way pixel-perfect results can be achieved for the chosen scale factor. TODO: the CSS background-image: image-set() tags are not supported on Firefox. TODO: try the 1.5x scale factor --- templates/fluid/fluid.xml | 26 ++++++++++++++++++++++++-- templates/fluid/template_album.html | 6 +++--- templates/fluid/template_index.html | 6 +++--- 3 files changed, 30 insertions(+), 8 deletions(-) (limited to 'templates/fluid') diff --git a/templates/fluid/fluid.xml b/templates/fluid/fluid.xml index 376d56d..ff4baee 100644 --- a/templates/fluid/fluid.xml +++ b/templates/fluid/fluid.xml @@ -31,6 +31,26 @@ + + + + + 2x + + + + + + - -set option:filter:blur 0.6 -filter Gaussian -thumbnail ${WIDTH}x${HEIGHT} - -set option:filter:blur 0.6 -filter Gaussian -thumbnail ${WIDTH}x${HEIGHT} + + -set option:filter:blur 0.6 -filter Gaussian -resize ${WIDTH}x${HEIGHT}! + -set option:filter:blur 0.6 -filter Gaussian -thumbnail ${WIDTH}x${HEIGHT}! diff --git a/templates/fluid/template_album.html b/templates/fluid/template_album.html index 721fc15..dbfb8d5 100644 --- a/templates/fluid/template_album.html +++ b/templates/fluid/template_album.html @@ -61,9 +61,9 @@
- - - + + +
diff --git a/templates/fluid/template_index.html b/templates/fluid/template_index.html index 74833dd..d0b6e8b 100644 --- a/templates/fluid/template_index.html +++ b/templates/fluid/template_index.html @@ -42,8 +42,8 @@
- -
+ + - +
-- cgit v1.2.3