imlib/filter: Fix offset argument being truncated.

This commit is contained in:
Kwabena W. Agyeman 2024-01-16 12:41:59 -08:00 committed by iabdalkader
parent f3cdeb4feb
commit b09dbbdd47
2 changed files with 3 additions and 3 deletions

View File

@ -1239,7 +1239,7 @@ void imlib_morph(image_t *img,
const int ksize,
const int *krn,
const float m,
const int b,
const float b,
bool threshold,
int offset,
bool invert,
@ -1250,7 +1250,7 @@ void imlib_morph(image_t *img,
buf.h = brows;
buf.pixfmt = img->pixfmt;
const int32_t m_int = fast_roundf(65536 * m);
const int32_t b_int = b << 16;
const int32_t b_int = fast_roundf(65536 * b);
invert = invert ? 1 : 0; // ensure binary
switch (img->pixfmt) {

View File

@ -1402,7 +1402,7 @@ void imlib_morph(image_t *img,
const int ksize,
const int *krn,
const float m,
const int b,
const float b,
bool threshold,
int offset,
bool invert,