Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix normalsize() - lel - Farbfeld image viewer
git clone git://git.codemadness.org/lel
Log
Files
Refs
README
LICENSE
---
commit 569ab289e66572fcc16959f1f8c55f7d82b17085
parent 049c5f73a2b1174d54d033e10bd5d34373f77884
Author: sin <[email protected]>
Date: Fri, 1 Aug 2014 22:22:00 +0100
Fix normalsize()
Signed-off-by: Hiltjo Posthuma <[email protected]>
Diffstat:
M lel.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/lel.c b/lel.c
@@ -160,12 +160,12 @@ normalsize(char *newbuf)
{
unsigned int x, y, soff = 0, doff = 0;
- for(y = 0; y < imgheight; y++) {
- for(x = 0; x < imgwidth; x++, soff += 4, doff += 4) {
- newbuf[doff+0] = imgbuf[soff+2];
- newbuf[doff+1] = imgbuf[soff+1];
- newbuf[doff+2] = imgbuf[soff+0];
- newbuf[doff+3] = imgbuf[soff+3];
+ for(y = 0; y < cimg->height; y++) {
+ for(x = 0; x < cimg->width; x++, soff += 4, doff += 4) {
+ newbuf[doff+0] = cimg->buf[soff+2];
+ newbuf[doff+1] = cimg->buf[soff+1];
+ newbuf[doff+2] = cimg->buf[soff+0];
+ newbuf[doff+3] = cimg->buf[soff+3];
}
}
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.