Skip to content

Commit 18f3809

Browse files
committed
Display: rounds scaled size when calcuating
Follows 179539c
1 parent 1cd87dc commit 18f3809

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/modules/display/display.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ bool ffPrintDisplay(FFDisplayOptions* options)
103103

104104
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
105105
double inch = sqrt(result->physicalWidth * result->physicalWidth + result->physicalHeight * result->physicalHeight) / 25.4;
106-
uint32_t scaledWidth = result->width * 96 / result->dpi;
107-
uint32_t scaledHeight = result->height * 96 / result->dpi;
106+
uint32_t scaledWidth = (result->width * 96 + result->dpi / 2) / result->dpi;
107+
uint32_t scaledHeight = (result->height * 96 + result->dpi / 2) / result->dpi;
108108
double scaleFactor = (double) result->dpi / 96.;
109109

110110
if(options->moduleArgs.outputFormat.length == 0)

0 commit comments

Comments
 (0)