Есть функция, которая выводит изображение в родном размере. Мне нужно научиться изменять размеры изображения. Для этого надо поправить некоторые места в функции. Подскажите пожалуйста- кроме перовй строки, где я ставлю ширину и высоту, что еще нужно здесь поменять???? PHP: function image_tag($image, $args="", $resize=1, $path_appendix='product',$thumb_width=120, $thumb_height=60 ) { global $mosConfig_live_site, $mosConfig_absolute_path; require_once( CLASSPATH . 'imageTools.class.php'); $border=""; if( strpos( $args, "border=" )===false ) { $border = 'border="0"'; } if ($image != "") { // URL if( substr( $image, 0, 4) == "http" ) { $url = $image; } // local image file else { if(PSHOP_IMG_RESIZE_ENABLE == '1' && $resize==1) { $url = $mosConfig_live_site."/components/com_virtuemart/show_image_in_imgtag.php?filename=".urlencode($image)."&newxsize=".PSHOP_IMG_WIDTH."&newysize=".PSHOP_IMG_HEIGHT."&fileout="; if( !strpos( $args, "height=" )) { $arr = @getimagesize( vmImageTools::getresizedfilename( $image, $path_appendix, '', $thumb_height, $thumb_width ) ); $width = $arr[0]; $height = $arr[1]; } } else { $url = IMAGEURL.$path_appendix.'/'.$image; $using_resized_image = false; if( $resize ) { $image = vmImageTools::getresizedfilename( $image, $path_appendix, '', $thumb_height, $thumb_width ); if( file_exists($image)) { $using_resized_image = true; } } if( $resize && ! $using_resized_image) { if( $height < $width ) { $width = @round($width / ($height / PSHOP_IMG_HEIGHT)); $height = PSHOP_IMG_HEIGHT; } else { $height = @round($height / ($width / PSHOP_IMG_WIDTH )); $width = PSHOP_IMG_WIDTH; } } if( file_exists($image)) { $url = str_replace( $mosConfig_absolute_path, $mosConfig_live_site, $image ); } elseif( file_exists($mosConfig_absolute_path.'/'.$image)) { $url = $mosConfig_live_site.'/'.$image; } $url = str_replace('//', '/', $url ); $url = str_replace(':/', '://', $url ); if( !strpos( $args, "height=" ) ) { $f = str_replace( IMAGEURL, IMAGEPATH, $url ); if ( file_exists($f) ) { $arr = getimagesize( $f ); $width = $arr[0]; $height = $arr[1]; } else { $width = 120; $height = 60; } } } $url = str_replace( basename( $url ), $GLOBALS['VM_LANG']->convert(basename($url)), $url ); } } else { $url = VM_THEMEURL.'images/'.NO_IMAGE; } return vmCommonHTML::imageTag( $url, '', '', $height, $width, '', '', $args.' '.$border ); }