Jump to:

5520 Posts in 1734 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » setHeight / set Width / JPG QUALITY 66?

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

Page: 1
Go to End
Author Topic: 1514 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    setHeight / set Width / JPG QUALITY 66? Link to this post

    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?

  • lerni
    Avatar
    Community Member
    80 Posts

    Re: setHeight / set Width / JPG QUALITY 66? Link to this post

    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);

    1514 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.