Skip to content
Snippets Groups Projects
Commit 67d264f9 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

optimize jpeg coding to produce smaller files (patch from Dave Coffin)
parent 6432547f
Branches
Tags
No related merge requests found
/* $Id: gl2jpeg.cpp,v 1.20 2003-11-04 17:10:29 geuzaine Exp $ */ /* $Id: gl2jpeg.cpp,v 1.21 2004-12-29 06:47:40 geuzaine Exp $ */
/* /*
* GL2JPEG, an OpenGL to JPEG Printing Library * GL2JPEG, an OpenGL to JPEG Printing Library
* Copyright (C) 1999-2003 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2003 Christophe Geuzaine <geuz@geuz.org>
...@@ -84,6 +84,7 @@ void create_jpeg(FILE * outfile, int width, int height, int quality) ...@@ -84,6 +84,7 @@ void create_jpeg(FILE * outfile, int width, int height, int quality)
cinfo.in_color_space = JCS_RGB; cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo); jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, quality, TRUE); jpeg_set_quality(&cinfo, quality, TRUE);
cinfo.optimize_coding = TRUE;
jpeg_start_compress(&cinfo, TRUE); jpeg_start_compress(&cinfo, TRUE);
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment