writeppm: for bitmaps, 1 is black, 0 is white
This commit is contained in:
parent
a1130d843d
commit
a3f776a13e
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,8 @@ writedata(Biobuf *fd, Image *image, Memimage *memimage, int rflag)
|
|||
pix = (data[i]>>depth*((xmask-x)&xmask))&pmask;
|
||||
if(((x+1)&xmask) == 0)
|
||||
i++;
|
||||
if(chan == GREY1)
|
||||
pix = pix == 1? 0: 1;
|
||||
if(rflag){
|
||||
if(chan == GREY1)
|
||||
Bputbit(fd, pix);
|
||||
|
|
Loading…
Reference in a new issue