Jump to:

10931 Posts in 2614 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Gallery image question

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 826 Views
  • BlueO
    Avatar
    Community Member
    52 Posts

    Gallery image question Link to this post

    Hello,

    I'm having a few problems with the gallery module, specifically image manipulations on my homepage.

    I can happily create a thumbnail of a GalleryPage's $DefaultIcon by including $DefaultIcon.PaddedImage(200, 200) in the template.

    But I want to change the background colour of the PaddedResize so included this function in the HomePage_Controller :

    public function generateLatestResize($gd) {
    return $gd->PaddedResize(600,400, $backgroundColor = "000000");
          }

    Now my issue is that $DefaultIcon.LatestResize doesn't return an image. Can anyone help me figure out what I'm doing wrong?
    I've tried including the function in other classes that extend Image or GalleryPage_Image but no joy.

    cheers

    Bernard

    826 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.