Black and white avatars for users. How?

Please help, How to make all new uploaded users avatars into grayscale?

There is a php function:

imagefilter($imageIMG_FILTER_GRAYSCALE);

How to implement it into the elgg?


 

  • u create a new avathar plugin useing the code of core/avathar or  edit core avathar/upload image function and use the image filter function (bt editing core may be affecting furthrer upgradings)

    1. 'imagefilter' is a php *gd *only (^= imagemagick) function.
    2. there's 4 resized images created from the one master image uploaded.
    3. are you sure you want to get bogged into gray-scaling profile avatars ? if i were a new user on your website and my nice techni-color avatar wad immediately converted to yuck gray-scale !! i'd most likely and never return lolz ;-)
    4. trying to code that gd function into the upload routines might seem easy at first - but you must have read the warnings about *not screwing with the core and bundled plugins' code !? too much scope for code troubles later on !
    5. you'd be far better off coding some simple-like *utility code to go through your datafolder/ YYYY/ MM/ DD/ GUID/ profile/  files and (batch) converting images there. lesser headaches.

     

  • sharon , DhrupDeScoop  Thanks for help!!!

    But I found a solution of this task without php coding:

    http://demosthenes.info/blog/532/Convert-Images-To-Black-And-White-With-CSS

    this css method works fine in firefoks, ie, chrome. Opera dosn't support filters yet :)

  • K..good and thanks for post the solution..