image-processing - cropVariants 的 imageManipulation 中的奇怪行为
问题描述
作为源文件,我有一个方形图像(500x500)。一旦我使用cropArea,预览显示整个区域已被选中(500x500px)
'cropVariants' => [
'default' => [
'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.crop_variant.default',
'allowedAspectRatios' => [
'1:1' => [
'title' => 'LLL:EXT:core/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.1_1',
'value' => 1.0
]
],
'selectedRatio' => '1:1',
'cropArea' => [
'x' => 0.0,
'y' => 0.0,
'width' => 1.0,
'height' => 1.0,
],
],
],
但是在数据库中,存储了以下数据(sys_file_reference):(问题y坐标)
{"default":{"cropArea":{"height":1,"width":1,"x":0,"y":-0.002},"selectedRatio":"1:1","focusArea" :无效的}}
在流体中,这是我的代码:
<f:image src="{item.image.0.reference.uid}" alt="{item.image.0.reference.description}" treatIdAsReference="1" />
因此,图像以 500 x 499 像素的流体渲染。(缺少 1 个像素)
知道如何调整行为吗?这样y坐标也设置为0并呈现整个选择?
解决方案
推荐阅读
- python-3.x - 从 CSV 行中删除回车符
- r - R,将 for 循环结果放入向量中,并将该向量添加到数据框中
- search - 什么时候在 bfs 或 dfs 中添加要访问的节点?
- c# - 是否可以在使用标准 e.graphics.drawstring 方法时使用端口和 IP 地址打印到打印机?
- google-apps-script - 获取 BigQuery 以读取驱动器文件夹中的所有 CSV 文件(相同架构)
- spring-boot - 在 Hibernate 中如何忽略选择中的关联表
- php - 不知道为什么我的程序不工作?(将 API 数据存储到 mySQL)
- python - 如何根据列表中的特定字符集从列表中的字符串中删除第一个和最后一个字符。(Python)
- postgresql - 如何在 postgresql 中保持现有字段完整的同时更新 jsonb 列
- javascript - 如何使用 nodejs / express 在同一端点中使用 GET 和 POST 方法