21493 Posts in 5784 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1619 Views |
-
Default image quality control

7 January 2009 at 3:34am
I'm interested in an easier way to control the default quality of uploaded images. So far i've been manually editing this line in GD.php:
protected static $default_quality = 75; // I change this to 100
The problem is each time I update SS, this is overwritten. Does anyone have a more practical suggestion for this that could be saved in mysite folder or in the database?
Also - it would be really nice to have this option not only in the admin area, but to allow a radiobox to chose between imageMagick and GD (I know this is a lot more work than it sounds). For now, I'm really only interested in a practical fix for controlling this image quality outside of GD.php
-
Re: Default image quality control

7 January 2009 at 3:55am
You can probably do this:
_config.php
GD::set_stat('default_quality',100);
-
Re: Default image quality control

7 January 2009 at 4:18am Last edited: 7 January 2009 4:34am
UncleCheese,
Thanks for the replies - I tried this and got (on the upload tab and on attempting to flush):
Fatal error: Using $this when not in object context in C:\wamp\www\rob\silverstripe\sapphire\core\Object.php on line 387
I tried something different based on your idea:
GD::set_default_quality(100);[edit] I'm not sure if it's working or not now
-
Re: Default image quality control

7 January 2009 at 4:43am
Bah.. sorry about that.
singleton('GD')->set_stat('default_quality',100);
-
Re: Default image quality control

7 January 2009 at 7:47am
Excellent - seems to be working great. Thanks!
| 1619 Views | ||
|
Page:
1
|
Go to Top |

