Skip to content

Commit

Permalink
Fix defining a background color when resizing an image.
Browse files Browse the repository at this point in the history
  • Loading branch information
mherger committed Sep 13, 2023
1 parent 24b6bd2 commit fc957f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changelog8.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h2><a name="v8.4.0" id="v8.4.0"></a>Version 8.4.0</h2>
<li>Fix Deezer SmartRadio track duration calculation.</li>
<li>Allow pausing Deezer Flow.</li>
<li>Fix browsing albums from Favorites menu.</li>
<li></li>
<li>Fix resizing with a defined background color.</li>
</ul>
<br />

Expand Down
3 changes: 3 additions & 0 deletions Slim/Utils/GDResizer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ sub resize {
$im->resize( {
width => $width,
height => $height,
bgcolor => hex($bgcolor),
keep_aspect => 1,
} );
}
Expand All @@ -176,6 +177,7 @@ sub resize {
$im->resize( {
width => $in_width,
height => $in_height,
bgcolor => hex($bgcolor),
keep_aspect => 1,
} );
# Requested size is smaller than original -> resize to requested size
Expand All @@ -184,6 +186,7 @@ sub resize {
$im->resize( {
width => $width,
height => $height,
bgcolor => hex($bgcolor),
keep_aspect => 1,
} );
}
Expand Down

0 comments on commit fc957f8

Please sign in to comment.