+libapache2-mod-chxj (0.12.9-1) unstable; urgency=low
+
+ * Changed Specification.
+ - When the size after it reduces becomes 0, it compels it to 1.
+ (Reported by someone. thanks!)
+ * Emergency measure
+ - MagickQuantizeImage function doesn't return.
+ (Reported by someone. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp> Sun, 20 Jul 2008 23:28:36 +0900
+
libapache2-mod-chxj (0.12.8-1) unstable; urgency=low
* Added function.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for mod_chxj 0.12.8-1.
+# Generated by GNU Autoconf 2.61 for mod_chxj 0.12.9-1.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='mod_chxj'
PACKAGE_TARNAME='mod_chxj'
-PACKAGE_VERSION='0.12.8-1'
-PACKAGE_STRING='mod_chxj 0.12.8-1'
+PACKAGE_VERSION='0.12.9-1'
+PACKAGE_STRING='mod_chxj 0.12.9-1'
PACKAGE_BUGREPORT=''
ac_unique_file="src/mod_chxj.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mod_chxj 0.12.8-1 to adapt to many kinds of systems.
+\`configure' configures mod_chxj 0.12.9-1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mod_chxj 0.12.8-1:";;
+ short | recursive ) echo "Configuration of mod_chxj 0.12.9-1:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mod_chxj configure 0.12.8-1
+mod_chxj configure 0.12.9-1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mod_chxj $as_me 0.12.8-1, which was
+It was created by mod_chxj $as_me 0.12.9-1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE=mod_chxj
- VERSION=0.12.8-1
+ VERSION=0.12.9-1
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mod_chxj $as_me 0.12.8-1, which was
+This file was extended by mod_chxj $as_me 0.12.9-1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-mod_chxj config.status 0.12.8-1
+mod_chxj config.status 0.12.9-1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([mod_chxj],[0.12.8-1])
+AC_INIT([mod_chxj],[0.12.9-1])
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([src/mod_chxj.c])
AC_CANONICAL_TARGET
+libapache2-mod-chxj (0.12.9-1) unstable; urgency=low
+
+ * Changed Specification.
+ - When the size after it reduces becomes 0, it compels it to 1.
+ (Reported by someone. thanks!)
+ * Emergency measure
+ - MagickQuantizeImage function doesn't return.
+ (Reported by someone. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp> Sun, 20 Jul 2008 23:28:36 +0900
+
libapache2-mod-chxj (0.12.8-1) unstable; urgency=low
* Added function.
+libapache2-mod-chxj (0.12.9-1) unstable; urgency=low
+
+ * Changed Specification.
+ - When the size after it reduces becomes 0, it compels it to 1.
+ (Reported by someone. thanks!)
+ * Emergency measure
+ - MagickQuantizeImage function doesn't return.
+ (Reported by someone. thanks!)
+
+ -- Atsushi Konno <konn@users.sourceforge.jp> Sun, 20 Jul 2008 23:28:36 +0900
+
libapache2-mod-chxj (0.12.8-1) unstable; urgency=low
* Added function.
#define PACKAGE_NAME "mod_chxj"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "mod_chxj 0.12.8-1"
+#define PACKAGE_STRING "mod_chxj 0.12.9-1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "mod_chxj"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.12.8-1"
+#define PACKAGE_VERSION "0.12.9-1"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "0.12.8-1"
+#define VERSION "0.12.9-1"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
EXIT_MAGICK_ERROR();
return HTTP_NOT_FOUND;
}
+ if (MagickStripImage(magick_wand) == MagickFalse) {
+ ERR(r, "mod_chxj: strip image failure.");
+ EXIT_MAGICK_ERROR();
+ return HTTP_NOT_FOUND;
+ }
if (spec->html_spec_type != CHXJ_SPEC_UNKNOWN) {
- /*
- * The size of the image is changed.
- */
- DBG(r,"call s_fixup_size()");
-
- if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL)
- return HTTP_NOT_FOUND;
+ int oldw = MagickGetImageWidth(magick_wand);
+ int oldh = MagickGetImageHeight(magick_wand);
+ int done_fixup_size = 0;
+ if ((qsp->mode == IMG_CONV_MODE_WALLPAPER && spec->wp_width < oldw && spec->wp_heigh < oldh)
+ || (qsp->mode != IMG_CONV_MODE_WALLPAPER && spec->width < oldw && spec->heigh < oldh)) {
+ /*
+ * The size of the image is changed.
+ */
+ DBG(r,"call s_fixup_size()");
+ if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL)
+ return HTTP_NOT_FOUND;
+
+ done_fixup_size = 1;
+ }
/*
* The colors of the image is changed.
*/
return HTTP_NOT_FOUND;
-
+ if (! done_fixup_size) {
+ /*
+ * The size of the image is changed.
+ */
+ DBG(r,"call s_fixup_size()");
+ if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL)
+ return HTTP_NOT_FOUND;
+ }
+
DBG(r,"start convert and compression");
if (spec->available_jpeg) {
return NULL;
}
- /*
- * The size of the image is changed.
- */
- DBG(r, "call s_fixup_size()");
-
- if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL)
+ if (MagickStripImage(magick_wand) == MagickFalse) {
+ ERR(r, "mod_chxj: strip image failure.");
+ EXIT_MAGICK_ERROR();
return NULL;
+ }
- /*
- * The colors of the image is changed.
- */
- DBG(r, "call s_fixup_color()");
+ {
+ int oldw = MagickGetImageWidth(magick_wand);
+ int oldh = MagickGetImageHeight(magick_wand);
+ int done_fixup_size = 0;
+ if ((qsp->mode == IMG_CONV_MODE_WALLPAPER && spec->wp_width < oldw && spec->wp_heigh < oldh)
+ || (qsp->mode != IMG_CONV_MODE_WALLPAPER && spec->width < oldw && spec->heigh < oldh)) {
+ /*
+ * The size of the image is changed.
+ */
+ DBG(r,"call s_fixup_size()");
- if ((magick_wand = s_fixup_color(magick_wand, r,spec, mode)) == NULL)
- return NULL;
+ if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL) {
+ EXIT_MAGICK_ERROR();
+ return NULL;
+ }
- /*
- * DEPTH of the image is changed.
- */
+ done_fixup_size = 1;
+ }
+ /*
+ * The colors of the image is changed.
+ */
+ DBG(r,"call s_fixup_color()");
- DBG(r,"call s_fixup_depth()");
+ if ((magick_wand = s_fixup_color(magick_wand, r,spec, mode)) == NULL) {
+ EXIT_MAGICK_ERROR();
+ return NULL;
+ }
- if ((magick_wand = s_fixup_depth(magick_wand, r, spec)) == NULL)
- return NULL;
+ /*
+ * DEPTH of the image is changed.
+ */
+ DBG(r,"call s_fixup_depth()");
+ if ((magick_wand = s_fixup_depth(magick_wand, r, spec)) == NULL) {
+ EXIT_MAGICK_ERROR();
+ return NULL;
+ }
+
+
+ if (! done_fixup_size) {
+ /*
+ * The size of the image is changed.
+ */
+ DBG(r,"call s_fixup_size()");
+ if ((magick_wand = s_fixup_size(magick_wand, r, spec, qsp)) == NULL) {
+ EXIT_MAGICK_ERROR();
+ return NULL;
+ }
+ }
+ }
DBG(r,"start convert and compression");
break;
}
+ if (neww == 0) neww = 1;
+ if (newh == 0) newh = 1;
+
if (spec->html_spec_type != CHXJ_SPEC_UNKNOWN) {
DBG(r,"convert width=[%d --> %d]", oldw, neww);
DBG(r,"convert heigh=[%d --> %d]", oldh, newh);
return magick_wand;
}
+ unsigned long colors = MagickGetImageColors(magick_wand);
+ DBG(r, "now color:[%ld] spec->color:[%ld]", colors, (unsigned long)spec->color);
+ if (colors < (unsigned long)spec->color) {
+ DBG(r, "Pass s_fixup_color proc. color:[%ld] spec->color:[%d]", colors, spec->color);
+ return magick_wand;
+ }
+
if (spec->color >= 256) {
DBG(r,"call MagickQuantizeImage() spec->color=[%d]",spec->color);