diff --git a/coders/txt.c b/coders/txt.c
index 78f7a56..e5b79ac 100644
--- a/coders/txt.c
+++ b/coders/txt.c
@@ -739,8 +739,8 @@
         GetPixelInfoPixel(image,p,&pixel);
         if (pixel.colorspace == LabColorspace)
           {
-            pixel.green-=QuantumRange/2.0;
-            pixel.blue-=QuantumRange/2.0;
+            pixel.green-=(QuantumRange+1)/2.0;
+            pixel.blue-=(QuantumRange+1)/2.0;
           }
         if (LocaleCompare(image_info->magick,"SPARSE-COLOR") == 0)
           {