Support Center

Recent questions

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Following up on quality of generated medium size images

Peter Kamphuis

Oct 27, 2016 06:01PM EDT

Beginning of this October I had requested about an improvement to reduce the file size of the generated medium 1600px images. You have elegantly solved that in release 0.22.9 by assigning the same quality setting as the original image to the generated one. Many thanks for that, but...

Somehow this is not working for me. At my provider's server ImageMagick is available (Koken is set up for that) and when manually performing "identify -format '%Q' <image>" I do get an according quality value returned (90 in my case). However, when uploading images, the 1600px versions still get a large file size: quality still gets assigned the default of 100.

Doing a little bit of debugging on your code, it seems that the getQuality method always returns 0 for me. Searching further, I find the code of this method somewhat suspicious:


public function getQuality()
if ($this->isGmagick) {
$cmd = "identify -format '%Q' ";
else {
$cmd = "gm identify -format '%[JPEG-Quality]' ";

Shouldn't the code in the "if" and "else" branches be exchanged? When I make that change, all is working as it should on my side.

Thanks in advance for taking a look into this.

Best regards,

Up 0 rated Down

Team NetObjects Koken Agent

Oct 28, 2016 11:21AM EDT

Thanks for the catch! It will be fixed in the next update.

This question has received the maximum number of answers.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found