+/*
+ * qscale: Quick, high-quality JPEG-to-JPEG scaler.
+ * Copyright (C) 2008 Steinar H. Gunderson <sgunderson@bigfoot.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
struct jpeg_error_mgr jerr;
dinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&dinfo);
- jpeg_stdio_src(&dinfo, stdin);
+ jpeg_stdio_src(&dinfo, file);
jpeg_read_header(&dinfo, TRUE);
dinfo.raw_data_out = TRUE;
jpeg_start_decompress(&dinfo);
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_compress(&cinfo);
- jpeg_stdio_dest(&cinfo, stdout);
+ jpeg_stdio_dest(&cinfo, file);
cinfo.input_components = 3;
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, jpeg_quality, FALSE);