ref: 68c2d09c95c3300689923eab3d40e0e206bceb7b
parent: 2925d4f6ebe4948542060e4a0b284a2aad020077
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Jul 15 22:30:35 EDT 2024
don't bother with pixel values below valid range
--- a/rast.c
+++ b/rast.c
@@ -666,7 +666,7 @@
if(qbzr(s₀, s-s₀, w, h, fp) == 0){
b = (u8int*)fp;
for(i = 0; i < npx; i++)
- b[i] = 255 - (fp[i] <= ε ? 0 : (fp[i] >= QBZR_PIX_SCALE ? 255 : fp[i]/QBZR_PIX_SCALE*255));
+ b[i] = 255 - (fp[i] < QBZR_PIX_SCALE/255 ? 0 : (fp[i] >= QBZR_PIX_SCALE ? 255 : fp[i]/QBZR_PIX_SCALE*255));
if((b = realloc(fp, npx)) != nil){
im->b = b;
im->w = w;