/*
- * Geeqie
- * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2011 The Geeqie Team
- *
- * Author: Vladimir Nadvornik
- *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
- */
-
-/* based on code from GdkPixbuf library - JPEG image loader
- *
* Copyright (C) 1999 Michael Zucchi
* Copyright (C) 1999 The Free Software Foundation
- *
- * Progressive loading code Copyright (C) 1999 Red Hat, Inc.
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
*
* Authors: Michael Zucchi <zucchi@zedzone.mmc.com.au>
* Federico Mena-Quintero <federico@gimp.org>
* Michael Fulbright <drmike@redhat.com>
+ * Vladimir Nadvornik
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * 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
- * Lesser General Public License for more details.
+ * 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 Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * 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 "main.h"
#include "image-load.h"
convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
guchar **lines)
{
- gint i, j;
+ gint i;
+ guint j;
g_return_if_fail (cinfo != NULL);
g_return_if_fail (cinfo->output_components == 4);
{
struct jpeg_source_mgr* src = (struct jpeg_source_mgr*) cinfo->src;
- if (num_bytes > src->bytes_in_buffer)
+ if ((gulong)num_bytes > src->bytes_in_buffer)
{
ERREXIT(cinfo, JERR_INPUT_EOF);
}
struct error_handler_data jerr;
lj->stereo = FALSE;
+// DEBUG_1("TG: JPG requested size w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
MPOData *mpo = jpeg_get_mpo_data(buf, count);
if (mpo && mpo->num_images > 1)
lj->requested_width = lj->stereo ? cinfo.image_width * 2: cinfo.image_width;
lj->requested_height = cinfo.image_height;
+// DEBUG_1("TG: JPG requested size v2 w=%d:h=%d", lj->requested_width > 0, lj->requested_height);
lj->size_cb(loader, lj->requested_width, lj->requested_height, lj->data);
cinfo.scale_num = 1;