On 3.1.10
I have an extension to Image to render images in greyscale.
First image in loop gets rendered to "_resampled" folder but no others, and the one that did get saved doesn't make it to the page.
Any ideas?
Extension looks like this
class Greyscale extends DataExtension {
public function GreyscaleImage($RGB = '76 147 29') {
return $this->owner->getFormattedImage('GreyscaleImage', $RGB);
}
public function generateGreyscaleImage(GD $gd, $RGB) {
$Vars = explode(' ', $RGB);
return $gd->greyscale($Vars[0], $Vars[1], $Vars[2]);
}
}
Template - each Panel has an image property called Image.
<% loop Panels.Limit(3, 0) %>
<div class="col-md-3 col-sm-6 hidden-xs nav_grid_top">
<img src="$Image.GreyscaleImage.CroppedImage(475, 550).URL" alt="$Image.Title" class="nav_grid_img"/>
<div class="nav_grid_content">
<h3>$Title</h3>
<hr/>
<h4>$SubTitle</h4>
<p>$Text</p>
<a href="$Link.Link">$ButtonText</a>
</div>
</div>
<% end_loop %>
Thanks.