diff options
author | ppatience0 <ppatience0@gmail.com> | 2013-05-12 16:36:29 -0400 |
---|---|---|
committer | ppatience0 <ppatience0@gmail.com> | 2013-05-12 16:36:29 -0400 |
commit | a3f776a13e8c38df9cec041bae4cbdab6fab8e8d (patch) | |
tree | 0b73a6ad42ec5655e49c2ac510c3303bde5f28ec /sys | |
parent | a1130d843d51baeca46081930cc1476381c0b891 (diff) |
writeppm: for bitmaps, 1 is black, 0 is white
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/cmd/jpg/writeppm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/jpg/writeppm.c b/sys/src/cmd/jpg/writeppm.c index bc18ecee8..9c96f538e 100644 --- a/sys/src/cmd/jpg/writeppm.c +++ b/sys/src/cmd/jpg/writeppm.c @@ -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); |