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

Image decorator for grayscaling. Please check.


Go to End


3 Posts   2730 Views

Avatar
dab

Community Member, 50 Posts

3 March 2011 at 11:19pm

Hello there, I need an image class decorator to show grayscaled images in my template.
Here the code: http://pastie.org/1625698
It looks ok for me, but don't work and returns nothing in template.
Please check if everything fine there in code.
Thanks.

Avatar
Carbon Crayon

Community Member, 598 Posts

31 March 2011 at 12:16am

Hi Dab,

here is a tutorial on creating greyscale images (as well as rotating them):

http://www.ssbits.com/tutorials/2010/rotating-and-greyscaling-images-using-gd-and-decorators/

Hope that helps,

Aram

Avatar
elgordo

Community Member, 70 Posts

19 November 2012 at 5:46pm

Edited: 19/11/2012 5:47pm

hi @dab

I've created an image utility module that includes greyscaling functionality, as well as a few other useful image related methods. I plan to add to it as and when a new requirements come up.

For more information have a look at Web of Talent - Image Utilities Module or on my github page, Gordon Anderson - GitHub - Image Utilities Module

Cheers

Gordon