Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

setHeight / set Width / JPG QUALITY 66?


Go to End


2 Posts   2084 Views

Avatar
borriej

Community Member, 267 Posts

9 April 2010 at 9:50pm

Hi,

How can you increase the jpg quality of the setHeight function?

When you upload an image (instance: $Picture) with jpg quality 100..

And do this: $Picture.setHeight(230)

the result gives a resized image (nice) but the quality is 66 and not 100.

How can I adjust this?

Avatar
lerni

Community Member, 81 Posts

10 April 2010 at 12:22am

hi

afaik you cant set it for the template unles you set it for the whole system per _conifg.php with

GD::set_default_quality(95);
otherwise resize the pics per php and set it in the function
$gd->setQuality(98);