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   1417 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 [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