summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Kramm <kramm@quiss.org>2011-08-31 17:59:57 -0700
committerMatthias Kramm <kramm@quiss.org>2011-08-31 17:59:57 -0700
commit2cff99b10bb17b26b9d269e551a17af2e099adcc (patch)
tree88d0cf79a10f45da44c0991ff030dfece26c067c /lib
parent09704e81296bef698368499394c37f4cc041d302 (diff)
fixed another bug in jpeg_save_to_memory()
Diffstat (limited to 'lib')
-rw-r--r--lib/jpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/jpeg.c b/lib/jpeg.c
index ddf50f63..e10f90d8 100644
--- a/lib/jpeg.c
+++ b/lib/jpeg.c
@@ -247,7 +247,7 @@ int jpeg_save_to_mem(unsigned char*data, unsigned width, unsigned height, int qu
} else if(components == 4) {
unsigned char*data2 = malloc(width*3);
for(t=0;t<height;t++) {
- unsigned char*line = &data[width*3*t];
+ unsigned char*line = &data[width*4*t];
int x;
for(x=0;x<width;x++) {
data2[x*3+0] = line[x*4+1];