Skip to content
Snippets Groups Projects
Commit 2fb49d5c authored by slevy's avatar slevy
Browse files

Write JPEG image with correct orientation.

parent 7ac7e482
No related branches found
No related tags found
No related merge requests found
......@@ -650,7 +650,7 @@ static int snapjpeg( char *outfname, int xsize, int ysize, char *rgbbuf )
while(cinfo.next_scanline < cinfo.image_height) {
JSAMPROW rowptr[1];
rowptr[0] = reinterpret_cast<JSAMPROW>(&rgbbuf[cinfo.next_scanline * xsize*3]);
rowptr[0] = reinterpret_cast<JSAMPROW>(&rgbbuf[(cinfo.image_height - 1 - cinfo.next_scanline) * xsize*3]);
jpeg_write_scanlines(&cinfo, rowptr, 1);
}
jpeg_finish_compress(&cinfo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment