Commit 7b65dd1d1 for imagemagick.org

commit 7b65dd1d1dd2896168ee960f9796b87778f7fd07
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Sat Jul 25 07:08:23 2026 -0400

    correct conditional

diff --git a/coders/jxl.c b/coders/jxl.c
index ede90274b..b0674d1ee 100644
--- a/coders/jxl.c
+++ b/coders/jxl.c
@@ -1215,17 +1215,15 @@ static MagickBooleanType WriteJXLImage(const ImageInfo *image_info,Image *image,
       JxlEncoderDestroy(jxl_info);
       ThrowWriterException(CoderError,"MemoryAllocationFailed");
     }
-  if (distance >= 0.0)
+  if (distance == 0.0)
     {
-      if (distance <= 0.0)
-        {
-          (void) JxlEncoderSetFrameDistance(frame_settings,0.f);
-          (void) JxlEncoderSetFrameLossless(frame_settings,JXL_TRUE);
-        }
-      else
-        (void) JxlEncoderSetFrameDistance(frame_settings,JXLGetDistance((float)
-          distance));
+      (void) JxlEncoderSetFrameDistance(frame_settings,0.0f);
+      (void) JxlEncoderSetFrameLossless(frame_settings,JXL_TRUE);
     }
+  else
+    if (distance > 0.0)
+      (void) JxlEncoderSetFrameDistance(frame_settings,
+        JXLGetDistance((float) distance));
   option=GetImageOption(image_info,"jxl:effort");
   if (option != (const char *) NULL)
     (void) JxlEncoderFrameSettingsSetOption(frame_settings,