From 2e2b3cc2adcaf339667c5b6e1a788ea3cc99aed3 Mon Sep 17 00:00:00 2001 From: Fedor Moiseev Date: Fri, 9 Jun 2023 14:38:12 +0200 Subject: [PATCH] fix obtaining pattern in case of negative pixstride (rotation of 90 or 180 degrees from original layout) --- core/src/ThresholdBinarizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/ThresholdBinarizer.h b/core/src/ThresholdBinarizer.h index 344cffb18b..c24636aa9b 100644 --- a/core/src/ThresholdBinarizer.h +++ b/core/src/ThresholdBinarizer.h @@ -32,7 +32,7 @@ class ThresholdBinarizer : public BinaryBitmap res.clear(); - for (const uint8_t* p = begin; p < end; p += stride) { + for (const uint8_t* p = begin; p != end; p += stride) { bool val = *p <= _threshold; if (val != lastVal) { res.push_back(narrow_cast((p - lastPos) / stride)); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy