X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fchxj_img_conv_format.c;h=5a49322f02cbd7bb3c65cde7b34dc9db37b1f409;hb=e68a6f8f78d560267a9666ea479edeceeeb27465;hp=2a452875780f214aceefc0f56aa03f1688cfa012;hpb=86bcee6fe7ef24fd2ff191b8532122cbe7138655;p=modchxj%2Fmod_chxj.git diff --git a/src/chxj_img_conv_format.c b/src/chxj_img_conv_format.c index 2a452875..5a49322f 100644 --- a/src/chxj_img_conv_format.c +++ b/src/chxj_img_conv_format.c @@ -666,8 +666,14 @@ s_create_cache_file(request_rec *r, int oldw = MagickGetImageWidth(magick_wand); int oldh = MagickGetImageHeight(magick_wand); int done_fixup_size = 0; + int ww = spec->width; + int hh = spec->heigh; + if (IS_IPHONE(spec->html_spec_type)) { + ww = (int)((double)ww * (double)1.5); + hh = (int)((double)hh * (double)1.5); + } 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)) { + || (qsp->mode != IMG_CONV_MODE_WALLPAPER && ww < oldw && hh < oldh)) { /* * The size of the image is changed. */ @@ -1106,8 +1112,14 @@ s_create_blob_data(request_rec *r, int oldw = MagickGetImageWidth(magick_wand); int oldh = MagickGetImageHeight(magick_wand); int done_fixup_size = 0; + int ww = spec->width; + int hh = spec->heigh; + if (IS_IPHONE(spec->html_spec_type)) { + ww = (int)((double)ww * (double)1.5); + hh = (int)((double)hh * (double)1.5); + } 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)) { + || (qsp->mode != IMG_CONV_MODE_WALLPAPER && ww < oldw && hh < oldh)) { /* * The size of the image is changed. */ @@ -1276,6 +1288,13 @@ s_fixup_size(MagickWand *magick_wand, c_width = spec->width; c_heigh = spec->heigh; + if (IS_IPHONE(spec->html_spec_type)) { + c_width = (int)((double)c_width * (double)1.5); + c_heigh = (int)((double)c_heigh * (double)1.5); + DBG(r,"REQ[%X] detect iphone width=[%d]", TO_ADDR(r),c_width); + DBG(r,"REQ[%X] detect iphone heigh=[%d]", TO_ADDR(r),c_heigh); + } + switch(mode) { case IMG_CONV_MODE_THUMBNAIL: