流体中的TYPO3裁剪图像 [英] TYPO3 crop image in fluid

查看:20
本文介绍了流体中的TYPO3裁剪图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 BE 中裁剪了图像.以及如何在流体中显示裁剪图像?

I have croped image in BE. And how to show croped image in the fluid?

我有庄稼地:

crop => '{"default":{"cropArea":{"height":0.24482758620689654,"width":0.4379310344827
         586,"x":0,"y":0.5586206896551724},"selectedRatio":"16:9","focusArea":null}}' (151 chars)

我在流体中试过:

<f:image image="{file}" crop="{file.crop}" class="main-img"/>

非常感谢!

推荐答案

据我所知,如果您只使用默认的cropvariant,则不需要告诉 f:image ViewHelper 任何有关裁剪的信息.但是我在 Mittwald 托管的网站上遇到了一些问题 - 那里的 GraphicsMagick 版本无法以某种方式进行裁剪(在其他 Mittwald 托管网站上,它使用相同的 GM 版本).所以我只是在前端裁剪有问题的网站上切换到 ImageMagick,然后它就起作用了.如果 GM 和裁剪有问题,默认的内容元素甚至不会在后端预览中显示裁剪的变体(文本和媒体元素)

As I know you dont need to tell the f:image ViewHelper anything about the cropping if you only use the default cropvariant. But I had some problems with Mittwald hosted websites - the GraphicsMagick version there was not able to crop somehow (on other Mittwald hosted sites it worked witht the same GM version). So I just switched to ImageMagick on the sites which had problems with cropping in the frontend and then it worked. If there is a problem with GM and cropping, default Content Elements won't even show the cropped variant in backend preview (Text and Media Elements)

这篇关于流体中的TYPO3裁剪图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆