Hey all, I've been going backwards and forwards through the wiki trying to find answers. Not sure if its me or Silver Stripe, so I ended up here.
Following this http://doc.silverstripe.com/doku.php?id=recipes:imageupload I've tired having this class in my dataobject, a gallery page, and finally thought it'd be best to have it self contained in its own file named "GalleryImage.php" with the following
class GalleryImage extends Image
{
function generateLarge($gd) {
$gd->setQuality(100);
return $gd->resizeRatio(350,500);
}
function generateThumb($gd) {
$gd->setQuality(100);
return $gd->paddedResize(100,100);
}
}
I always get call to member function on a non object. Am I naming the class incorectly? Some how the GD class isn't being accessed? Any light on the topic would be great. I'm using SS 2.3.3
P.S
I'm using uncle cheese's dataobject manager to allow for image caption and stuff, I'm associating the attachment with my GalleryImage like so
static $has_one = array (
'Attachment' => 'GalleryImage',
'GalleryPage' => 'GalleryPage'
);