Browse Source

* Patch from Colin Western to read B/W bitmaps with padding bits (19237)

git-svn-id: trunk@17390 -
michael 14 years ago
parent
commit
90af29cda9
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/fcl-image/src/fpreadpnm.pp

+ 4 - 4
packages/fcl-image/src/fpreadpnm.pp

@@ -229,13 +229,13 @@ Var
       L:=P^;
       for j:=0 to 7 do
         begin
-          if odd(L)
-          then
+        if x < FWidth then
+          if odd(L) then
             Img.Colors[x,Row]:=colBlack
           else
             Img.Colors[x,Row]:=colWhite;
-          L:=L shr 1;
-          dec(x);
+        L:=L shr 1;
+        dec(x);
         end;
       Inc(P);
       Inc(x,16);