Set shadow position moves image
Hi I have a number of overlays. On one overlay I have a shadow. When I try to set the shadow direction I it moves the image instead e_shadow,x_20. I have tried fl_layer_apply.
image/upload/c_scale,w_800/l_api:pixel,e_colorize,co_rgb:f76706,w_0.9,h_0.6,y_10,fl_relative/l_api:download_4,w_0.9,c_fill,x_10,fl_relative,e_grayscale,e_tint:100:392c81/l_api:download_3,w_0.9,fl_relative,e_shadow:0,,x_-20,co_rgb:14a954/v1602101469/api/pixel.jpg
Thanks

-
Hey James!
I wanted to answer here as well so that other clients who experience similar difficulties could see the answer.
It seems that the
relativeflag causes an issue when combined with thelayer_applyflag, which I'm not sure is a bug or not - I'll have to check.However, I did manage to work around it by omitting the
relativeflag and multiply each relative value with the base image value (see beloww_0.9_mul_$w). After that, adding thelayer_applyflag worked as expected -
https://res.cloudinary.com/makingthings/image/upload/c_scale,w_800/$w_w/l_api:pixel,e_colorize,co_rgb:f76706,w_0.9_mul_$w,h_0.6_mul_$w/y_10,fl_layer_apply/l_api:download_4,w_0.9_mul_$w,c_fill,e_grayscale,e_tint:100:392c81/x_10,fl_layer_apply/l_api:download_3,w_0.9_mul_$w,x_-20,e_shadow:0,co_rgb:14a954/x_-20,fl_layer_apply/v1602101469/api/pixel.jpgHere is a breakdown of the above URL -
https://res.cloudinary.com/makingthings/image/upload/ c_scale,w_800/$w_w/ l_api:pixel,e_colorize,co_rgb:f76706,w_0.9_mul_$w,h_0.6_mul_$w/y_10,fl_layer_apply/ l_api:download_4,w_0.9_mul_$w,c_fill,e_grayscale,e_tint:100:392c81/x_10,fl_layer_apply/ l_api:download_3,w_0.9_mul_$w,x_-20,e_shadow:0,co_rgb:14a954/x_-20,fl_layer_apply/ v1602101469/api/pixel.jpgNotice that by finetuning the
xvalue of the shadow effect, the image/layer dimensions change. For instance, the abovex_-20widens the layer by 20 pixels. Since that, the center position of the image (with the shadow) gets changed. This is why the models move a bit to the right (compared to this attempt).Additional information regarding variables (e.g - the above
$w) can be found here -
https://cloudinary.com/documentation/user_defined_variables0
Post is closed for comments.
Comments
1 comment