Home Backend Development PHP Tutorial php开发,请教大家商城图片是怎么解决

php开发,请教大家商城图片是怎么解决

Jun 13, 2016 am 10:25 AM
resize small style

php开发,请问大家商城图片是如何解决?
情况是这样的。。。

商城中某商品,在前台的设计中,图片大小分为四种类型,即
1.small_pic,就是最小的图,用在下定单,或者侧栏显示
2.list_pic,栏目列表及首页列表展示的图片
3.goods_show_pic,用于商品展示页面的图,利用js可以放大,放大的图就是下面所要说的图,原始尺寸的图片
4.original_pic,原始图片,规定好尺寸,用来被放大

这样的图片,我的想法,是通过原始图片,缩三次,成为三张不同尺寸的图片,跟sina博客一般的

我不知道这样的方法可不可行,还是说,让设计师做好除原始图另外三张图,再分别上传?

大家谈谈自己的创意及做法,谢谢先。。。

------解决方案--------------------

探讨
呃。。。难道大家都是一张图搞惦的?不需要利用程序再生成?

------解决方案--------------------
探讨

呃,大家都理解错我的意思了。。。

之于放大缩小,不是我的问题的重点,这些都是小事情。。

我的问题的重点就是:产品需要图片,图片的格式分为四个类型,就是最小的缩略图,列表图,展示图及放大图

我想问问大家,如果是你们自己来弄这个系统,图片是通过原始图,生成指定尺寸的图片,还是分四次上传所需要的四张图?或者正如大家说的一样,上传一张图,然后通过style样定义图片的大小(这个方法肯定……

------解决方案--------------------
上传一张原图。用程序自动生成多张需要的缩略图。这是比较实用的方法。

若果每次上传都需要传几张照片。那工作量大了点。还要劳烦美工那边动工。实在有失效率呀!
------解决方案--------------------

好吧。当我没说。
------解决方案--------------------
我觉得还是设置尺寸比较省事
------解决方案--------------------
想要高质量的图片肯定需要GD2的resize来裁剪图片,而且单纯用CSS定义的话,小图没什么问题,大图的话会影响整站的加载速度,多几张图片就把你网站搞垮
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to modify element.style How to modify element.style Nov 24, 2023 am 11:15 AM

Methods for element.style to modify elements: 1. Modify the background color of the element; 2. Modify the font size of the element; 3. Modify the border style of the element; 4. Modify the font style of the element; 5. Modify the horizontal alignment of the element. Detailed introduction: 1. Modify the background color of the element, the syntax is "document.getElementById("myElement").style.backgroundColor = "red";"; 2. Modify the font size of the element, etc.

How to dynamically modify style in react How to dynamically modify style in react Dec 28, 2022 am 10:44 AM

Methods for react to dynamically modify style: 1. Add ref to the element whose style needs to be modified, with syntax such as "<div className='scroll-title clear-fix' ref={ this.manage }>"; 2. Through dynamic control The change of state modifies the style of the element; 3. By using JS code in the DOM, the display and hiding transitions of different DOMs are realized.

What are the new features in Vue3 style and how to use them What are the new features in Vue3 style and how to use them May 14, 2023 pm 10:52 PM

New features of style Vue3.2 version has made many upgrades to the style of single-file components, such as local styles, css variables, and styles exposed to templates. (Learning video sharing: Vue video tutorial) 1. Local style When the label has scoped attribute, its CSS will only be applied to the elements of the current component: hi.example{color:red;} 2. The depth selector is scoped If the selector in the style wants to make a more "deep" selection, that is, affect sub-components, you can use the :deep() pseudo-class: .a:deep(.b){/*...*/ }DOM content created through v-html will not be

How to compress and format images in Vue? How to compress and format images in Vue? Aug 25, 2023 pm 11:06 PM

How to compress and format images in Vue? In front-end development, we often encounter the need to compress and format images. Especially in mobile development, in order to improve page loading speed and save user traffic, it is critical to compress and format images. In the Vue framework, we can use some tool libraries to compress and format images. Compression using the compressor.js library compressor.js is a JavaS for compressing images

Panasonic Lumix S9 supply shortages complete Fujifilm X100VI impersonation act despite bad press Panasonic Lumix S9 supply shortages complete Fujifilm X100VI impersonation act despite bad press Jun 14, 2024 am 09:36 AM

Sinceitslaunchearlierthisyear,thePanasonicLumixS9hasbeenembroiledincontroversy.BetweenthecornersPanasoniccuttoarriveatsuchasmallbodyandthefusscertaincamerareviewerskickeduponYouTube,itseemedliketheLumixS9wasdoom

Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? Aug 26, 2023 pm 10:58 PM

Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? In Vue development, we often use the v-bind instruction to dynamically bind class and style, but sometimes we may encounter some problems, such as being unable to correctly use v-bind to bind class and style. In this article, I will explain the cause of this problem and provide you with a solution. First, let’s understand the v-bind directive. v-bind is used to bind V

How to resize, crop, rotate, and flip images in Python How to resize, crop, rotate, and flip images in Python May 10, 2023 am 10:43 AM

Resize, crop, rotate, and flip images. First, our original images are 10 images of different sizes downloaded from the Internet, as follows: Operation 1: resize Resize the image to the same size (320,240) fromPILimportImageimporttorchvision.transformsastransforms# Use the PIL library to read in Image and resizeefResizeImage():ifnotos.path.exists(rdir):os.makedirs(rdir)foriinrange(10):im=Image.open(d

Use the :checked pseudo-class selector to change the style of a selected checkbox or radio button Use the :checked pseudo-class selector to change the style of a selected checkbox or radio button Nov 20, 2023 am 11:48 AM

Because the article is of limited length, only brief code examples are included. Here's an example: Suppose we have the following HTML structure: &lt;!DOCTYPEhtml&gt;&lt;htmllang="en"&gt;&lt;head&gt;&lt;metacharset="UTF-8"&gt;&lt;metaname="viewpo

See all articles