# HG changeset patch # User persquare # Date 1089187120 0 # Node ID b421bf23c5029674ea39199cda85360dcb7f7769 # Parent 6e33849c9229d608c5d563c265d722f944803976 Fixing off-by-one error in color map indexing. diff --git a/bmpwrite.m b/bmpwrite.m --- a/bmpwrite.m +++ b/bmpwrite.m @@ -37,7 +37,7 @@ ## raster image, each line on a 32-bit boundary, padded with zeros ## lines written bottom to top. - fwrite(file,postpad(flipud(x)',ceil(columns(x)/4)*4),"uchar",0,arch); + fwrite(file,postpad(flipud(x-1)',ceil(columns(x)/4)*4),"uchar",0,arch); fclose(file); endfunction