Skip to content

Commit

Permalink
Lower tweak factor
Browse files Browse the repository at this point in the history
After testing with >10k pictures the tweak factor gets lowered to 1.9 (90 %) from 2.5 (150 %)

With a tweak factor of 1.9 there were still no out of memory errors.

http://redmine.ilch2.de/issues/561
  • Loading branch information
blackcoder87 committed Jan 19, 2019
1 parent 82dddc6 commit 29ff8e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/libraries/Ilch/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public function guessRequiredMemory($imageFilePath)
// channels will be 3 for RGB pictures and 4 for CMYK pictures
// bits is the number of bits for each color.
// The tweak-factor might be overly careful and could therefore be lowered if necessary.
return ($imageInfo[0] * $imageInfo[1] * ($imageInfo['bits'] / 8) * $imageInfo['channels'] * 2.5);
return ($imageInfo[0] * $imageInfo[1] * ($imageInfo['bits'] / 8) * $imageInfo['channels'] * 1.9);
}

public function upload()
Expand Down

0 comments on commit 29ff8e1

Please sign in to comment.