Skip to content

Commit

Permalink
Go slightly larger during initial scaling in PlaylistEntryImage
Browse files Browse the repository at this point in the history
There are some cases where the scaled image would still be one
pixel less than desired in height or width, so go slightly larger
to ensure we can crop down to the desired size for display.
  • Loading branch information
cpinkham committed Dec 30, 2024
1 parent fa69445 commit 5d5dbb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/playlist/PlaylistEntryImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void PlaylistEntryImage::PrepImage(void) {
// Resize to slightly larger since trying to get exact can
// leave us off by one pixel. Going slightly larger will let
// us crop to exact size later.
image.resize(Geometry(m_width + 2, m_height + 2, 0, 0));
image.resize(Geometry(m_width + 4, m_height + 4, 0, 0));

cols = image.columns();
rows = image.rows();
Expand Down

0 comments on commit 5d5dbb8

Please sign in to comment.