diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-04-08 12:08:23 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-04-08 12:08:23 +0200 |
commit | aa76f442a611c7fe60bb0d8bfa53fcc334d2dda8 (patch) | |
tree | 1106a707fe82eeaa74904ce89956686983890bc7 /lib/App/Dthumb.pm | |
parent | 9b243c81dac2a08e3cc1436d28903433b7c6f1da (diff) |
create thumbnails at 2x resolution for high-dpi displays
Diffstat (limited to 'lib/App/Dthumb.pm')
-rwxr-xr-x | lib/App/Dthumb.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index 74face3..229a3c1 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -38,9 +38,11 @@ sub new { $ref->{data} = App::Dthumb::Data->new(); $ref->{data}->set_vars( - title => $conf{title}, - width => $conf{size} * $conf{spacing} . 'px', - height => $conf{size} * $conf{spacing} . 'px', + title => $conf{title}, + boxwidth => $conf{size} * $conf{spacing} . 'px', + boxheight => $conf{size} * $conf{spacing} . 'px', + imgwidth => $conf{size} . 'px', + imgheight => $conf{size} . 'px', ); $ref->{html} = $ref->{data}->get('html_start.dthumb'); @@ -192,7 +194,7 @@ sub create_thumbnail_image { my ( $self, $file ) = @_; my $thumbdir = $self->{config}->{dir_thumbs}; - my $thumb_dim = $self->{config}->{size}; + my $thumb_dim = $self->{config}->{size} * 2; if ( -e "${thumbdir}/${file}" and not $self->{config}->{recreate} |