Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image oscommerce:将拇指图像Propacative更改为原始产品图像_Image_Thumbnails_Oscommerce - Fatal编程技术网

Image oscommerce:将拇指图像Propacative更改为原始产品图像

Image oscommerce:将拇指图像Propacative更改为原始产品图像,image,thumbnails,oscommerce,Image,Thumbnails,Oscommerce,我想把新产品图片改成原始图片 当我为产品上传图像时,图像会被压缩,所以有什么帮助吗?我们将tep_图像函数修改为接受-1,这意味着它将只输出“高度”或“宽度”约束,但不会同时输出这两个约束。您可以根据自己的喜好对其进行修改,但需要查看tep_image()的includes/functions/html_output.php //HTML图像包装函数 函数tep_image($src,$alt='',$width='',$height='',$parameters=''){ if((空($在此输

我想把新产品图片改成原始图片


当我为产品上传图像时,图像会被压缩,所以有什么帮助吗?

我们将tep_图像函数修改为接受-1,这意味着它将只输出“高度”或“宽度”约束,但不会同时输出这两个约束。您可以根据自己的喜好对其进行修改,但需要查看tep_image()的includes/functions/html_output.php

//HTML图像包装函数
函数tep_image($src,$alt='',$width='',$height='',$parameters=''){
if((空($在此输入代码src)| |($src==DIR_WS_IMAGES))&&(IMAGE_REQUIRED==false)){
返回false;
}
如果($src==“images/”)
$src='images/noimage.jpg';
//alt被添加到img标记中,即使它为null也可以防止浏览器输出
//图像文件名为默认值
$image='';
返回$image;
}
    // The HTML image wrapper function
  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    if ( (empty($enter code heresrc) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
      return false;
    }

    if($src=='images/')
        $src='images/noimage.jpg';
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
    $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

    if (tep_not_null($alt)) {
      $image .= ' title=" ' . tep_output_string($alt) . ' "';
    }
        if(((int)$height==-1) && ((int)$width)==-1){
          $image .= '';
        }elseif((!empty($width) && ((int)$height)==-1)){
          $image .= ' width="' . tep_output_string($width) . '" ';
        }elseif((!empty($height) && ((int)$width)==-1)){
          $image .= ' height="' . tep_output_string($height) . '" ';
        }else{
            if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
              if ($image_size = @getimagesize($src)) {
                if (empty($width) && tep_not_null($height)) {
                  $ratio = $height / $image_size[1];
                  $width = intval($image_size[0] * $ratio);
                } elseif (tep_not_null($width) && empty($height)) {
                  $ratio = $width / $image_size[0];
                  $height = intval($image_size[1] * $ratio);
                } elseif (empty($width) && empty($height)) {
                  $width = $image_size[0]; 
                  $height = $image_size[1];
                }
              } elseif (IMAGE_REQUIRED == 'false') {
                return false;
              }
            }
            if (tep_not_null($width) && tep_not_null($height)) {
              $image .= ' wddidth="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
            }
        }  

    if (tep_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= '>';

    return $image;
  }