/*
- * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005-2009 Atsushi Konno All rights reserved.
* Copyright (C) 2005 QSDN,Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
apr_finfo_t cache_dir_st;
MagickWand *magick_wand;
+ int img_count;
if (STRCASEEQ('c','C',"chxj-qrcode",r->handler)) {
/*------------------------------------------------------------------------*/
EXIT_MAGICK_ERROR();
return HTTP_NOT_FOUND;
}
+
+ /*------------------*/
+ /* for AnimationGIF */
+ /*------------------*/
+ img_count = MagickGetNumberImages(magick_wand);
+ DBG(r, "REQ[%X] img_count is [%d]", (unsigned int)(apr_size_t)r, img_count);
+ if (img_count > 1) {
+ MagickSetImageIndex(magick_wand, 0);
+ MagickWand *magick_wand2 = MagickGetImage(magick_wand);
+ DestroyMagickWand(magick_wand);
+ magick_wand = magick_wand2;
+ }
+
if (MagickStripImage(magick_wand) == MagickFalse) {
ERR(r, "mod_chxj: strip image failure.");
EXIT_MAGICK_ERROR();
"qrc", /* QRCode出力用ファイルの拡張子 */
"",
};
- char *fname;
+ char *fname = NULL;
char *idx;
char *filename_sv;
int do_ext_check = TRUE;