Change images to grayscale

A forum for Bolt related questions / issues

Change images to grayscale

Postby Dorien » Thu Sep 25, 2014 9:58 am

Hi!

Could there be a way i can make a thumbnail copy of an color image to grayscale. So convert an image to grayscale and save that as a copy. Mabye someone has made this in the past?

~ Dorien
Dorien
 
Posts: 21
Joined: Mon Nov 11, 2013 3:34 pm

Re: Change images to grayscale

Postby hansfn » Sat Sep 27, 2014 12:02 am

The thumbnails are created by timthumb.

Most thumbnail settings (timthumb config) is set in app/config/config.yml - look for the key "thumbnails:". However, filters are not configurable through that config file - you need to edit app/classes/timthumb.php (This should probably be filed as a feature request on https://github.com/bolt/bolt/

If you change

Code: Select all
define ('DEFAULT_F', '');

to

Code: Select all
define ('DEFAULT_F', '2');


around line 150 you get greyscale thumbs. (You might have to clear the cache first.) List of filter values.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Change images to grayscale

Postby streeff » Mon Oct 20, 2014 10:46 am

Would be even better if you could only apply that to some specific thumbnails, not all.
Evert Albers, Streeff - web // branding // information design - Amersfoort & Amsterdam, NL
Site: http://www.streeff.nl
User avatar
streeff
 
Posts: 146
Joined: Sat Jul 25, 2009 9:28 pm
Location: Amersfoort, NL


Return to Bolt Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron