本文介绍了使用Cloudinary将获取的图像覆盖在其自身上(带有转换)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成具有相同获取图像版本的图像,如下所示:

I would like to generate an image with to versions of the same fetch image, like this one:

这是两个版本:

背景: https://res.cloudinary.com/nho/image/fetch/w_1024,h_512, c_thumb,g_auto,q_auto,f_auto/e_brightness:80/e_blur:3000/https://nicolas-hoizey.com/2016/08/a-bridge-not-so-far.jpg

叠加层: https://res.cloudinary.com/nho/image/fetch/w_1024,h_512,c_fit,q_auto,f_auto/https://nicolas-hoizey.com/2016/08/a-bridge-not-so-far.jpg

我不知道如何使用重叠链式转换.

推荐答案

Then, achieving the desired effect is done with the following transformation sequence:http://res.cloudinary.com/demo/image/upload/w_500/u_upload:2016:08:a-bridge-not-so-far,ar_2:1,c_scale,e_blur:2000,o_70,w_0.7,c_crop/h_1.0,fl_relative.layer_apply/2016/08/a-bridge-not-so-far.jpg

更新:Cloudinary刚刚宣布了对覆盖动态获取的图像的新支持.这是通过将远程URL编码为Base64来完成的,例如(导轨):

UPDATE:Cloudinary just announced a new support for overlaying dynamically fetched images. This is done by encoding the remote URL to Base64, e.g. (rails):

Base64.urlsafe_encode64("https://nicolas-hoizey.com/2016/08/a-bridge-not-so-far.jpg")
 => "aHR0cHM6Ly9uaWNvbGFzLWhvaXpleS5jb20vMjAxNi8wOC9hLWJyaWRnZS1ub3Qtc28tZmFyLmpwZw=="

然后,转换URL如下所示: https://res.cloudinary.com/demo/图像/获取/w_500/u_fetch:aHR0cHM6Ly9uaWNvbGFzLWhvaXpleS5jb20vMjAxNi8wOC9hLWJyaWRnZS1ub3Qtc28tZmFyLmpwZw ==,ar_2:1,c_scale,e_blur:2000,o_70,w_0.7,c_crop/h_1.0,fl_relative.layer_apply/HTTPS://nicolas-hoizey.com/2016/08/a-bridge-not-so-far.jpg

Then the transformation URL will look something like:https://res.cloudinary.com/demo/image/fetch/w_500/u_fetch:aHR0cHM6Ly9uaWNvbGFzLWhvaXpleS5jb20vMjAxNi8wOC9hLWJyaWRnZS1ub3Qtc28tZmFyLmpwZw==,ar_2:1,c_scale,e_blur:2000,o_70,w_0.7,c_crop/h_1.0,fl_relative.layer_apply/https://nicolas-hoizey.com/2016/08/a-bridge-not-so-far.jpg

这篇关于使用Cloudinary将获取的图像覆盖在其自身上(带有转换)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 14:47