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.

Customising the CMS

Image decorator for grayscaling. Please check.


Reply

3 Posts   1347 Views

Avatar
dab

3 March 2011 at 11:19pm Community Member, 50 Posts

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

31 March 2011 at 12:16am Community Member, 598 Posts

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

19 November 2012 at 5:46pm (Last edited: 19 November 2012 5:47pm), Community Member, 70 Posts

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 [url=http://weboftalent.asia/blog/image-util-module/]Web of Talent - Image Utilities Module[/url] or on my github page, [url=https://github.com/gordonbanderson/weboftalent-image-util/tree/stable24]Gordon Anderson - GitHub - Image Utilities Module[/url]

Cheers

Gordon