Reply To: Image Backgrounds Still Black Even When Set to White

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Image Backgrounds Still Black Even When Set to White Reply To: Image Backgrounds Still Black Even When Set to White

#912

Ernest Marcinko
Keymaster

Indeed! I tested it and its broken. The problem was, that the new administrator interface outputs the color values in “rgba” format and the coloring algorithm awaits a hex format. I will fix it tomorrow morning in the repository, until then I will show you a quick temporary solution:

Open up the wp-content/plugins/ajax-search-pro/includes/imagecache.class.php file and go to line 76, and you should see something like this:

    function img_resizer($src,$quality,$w,$h,$saveas, $color) {
        if (!extension_loaded('gd') || !function_exists('gd_info')) {
            return "";
        }
        $method = $this->can_get_file();
        if( $method==false) {
            return "";
        }   

Change it to:

    function img_resizer($src,$quality,$w,$h,$saveas, $color) {
        if (!extension_loaded('gd') || !function_exists('gd_info')) {
            return "";
        }
        $color = "#ffffff";
        $method = $this->can_get_file();
        if( $method==false) {
            return "";
        }  

Save the file, empty the search cache and the upcoming images should now have a white background.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)