[英]CKFinder - Image cutting to specified dimensions
When I upload a picture in CKFinder I wish this image to be 830x421px
. 当我在CKFinder上传图片时,我希望这张图片是830x421px
。 But for some reason, the image is not cut to those dimensions.. Instead either the height or the width is automatically made 830px
or 421px
... So the question is: How can I make CKFinder cut the image to those sizes, instead resizing...? 但由于某种原因,图像不会被切割到那些尺寸。相反,高度或宽度自动为830px
或421px
...所以问题是:我怎样才能使CKFinder将图像切割成那些尺寸,而不是调整大小...? There seems to be some kind of aspect-ratio in place that I cannot find/locate? 似乎有一些我无法找到/定位的宽高比?
$config['images'] = array(
'maxWidth' => 830,
'maxHeight' => 421,
'quality' => 80,
'sizes' => array(
'small' => array('width' => 182, 'height' => 120, 'quality' => 80),
'medium' => array('width' => 341, 'height' => 225, 'quality' => 80),
'large' => array('width' => 830, 'height' => 421, 'quality' => 80)
)
);
If you look at ckfinder\\core\\connector\\php\\vendor\\cksource\\ckfinder\\src\\CKSource\\CKFinder\\Image.php
you will see that resize
method (for resizing images of course), actually has hardcoded call to calculateAspectRatio
method (around line 549). 如果你看一下ckfinder\\core\\connector\\php\\vendor\\cksource\\ckfinder\\src\\CKSource\\CKFinder\\Image.php
你会看到resize
方法(当然用于调整图像大小),实际上有硬编码调用calculateAspectRatio
方法(周围)第549行)。 It seems that you were right and there really is an internal aspect-ratio. 看起来你是对的,确实有一个内部宽高比。 I cannot also see any way to disable it from outside unfortunately. 不幸的是,我也无法看到任何从外面禁用它的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.