产品库

编程入门 行业动态 更新时间:2024-10-20 06:38:45
产品库 - 这个网站如何为每种可能的组合生成图像(Product gallery - how this websites generates images for every possible combination)

你知道这个网站如何在画廊中实现定制效果吗? 当你改变戒指的颜色,宝石或其他属性时,它看起来像是一个新的图像生成。

http://www.gemvara.com/Round-Blue-Topaz-Sterling-Silver-Ring-by-Gemvara-Essentials/jewelry/v/342899/

(点击自定义)

你认为他们有成千上万的图像适合每种可能的组合吗? 或者也许他们使用一些东西来产生它们?

Do you know how this website achieves the customization effect in the gallery? When you change the color, the stones or other attributes of the ring, it looks like a new image is generated.

http://www.gemvara.com/Round-Blue-Topaz-Sterling-Silver-Ring-by-Gemvara-Essentials/jewelry/v/342899/

(click Customize)

Do you think they have thousands of images for every possible combination? Or maybe they use something to generate them?

最满意答案

在不检查源代码的情况下,我可以说他们只是为每个环加载一个单独的映像是非常确定的。 有可能图像本身可能是从单一源图形(它们看起来非常相似)处理的,但就网站而言,它们是独立的图像。

但是我过去使用过的一种技术来获取我想要的任何颜色的图形,就是使用具有透明度的灰度叠加层,以及我想要的颜色背后的纯色背景色。

如果在要打印颜色的区域中使用具有alpha通道透明度部分的PNG图像,即使对于具有斑点效果颜色的全彩色图像(与示例网站中的图像一样),也可以工作。

由于灰色前景,这种技术倾向于产生看起来像柔和色彩的色调,并且它仅适用于不需要复杂色彩变化的图像,但它可以工作。

另一方面,对于像该网站上的图像,最好为每个产品使用单独的图形。 更简单,更简单,更诚实(如果您销售的产品带有该产品的照片,如果该图像实际上是一张真实照片而不是计算机生成的,则人们会更信任您)

Without examining their source code, I would say it's a near certainty that they're just loading a separate image for each ring. It's possible that the images themselves may have been processed from a single source graphic (they do look very similar), but as far as the site is concerned they're separate images.

But one technique I've used in the past to get a graphic in any colour I want is to use a greyscale overlay with transparency, and a solid background colour behind it in the colour I want.

This can work even for a full colour image with a spot-effect colour (as with the images in the example site), if you use a PNG image with an alpha channel transparency section in the area you want to colour.

Due to the grey foreground, this technique tends to produce shades that look like pastel colours, and it's only suitable for images where you don't need complex colour changes, but it can work.

On the other hand, for images like the ones on that site, it's probably better just to use a separate graphic for each product. Simpler, easier, and more honest (if you're selling a product with an photo of that product, people will trust you more if that image is actually a real photo rather than computer generated)

更多推荐

本文发布于:2023-07-31 00:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340516.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:产品库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!