From aa76f442a611c7fe60bb0d8bfa53fcc334d2dda8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 8 Apr 2021 12:08:23 +0200 Subject: create thumbnails at 2x resolution for high-dpi displays --- lib/App/Dthumb.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') 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} -- cgit v1.2.3