New image filter that allows filling background of image with selected color
and fixes 'dark background' problem when saving images with transparency as JPEGs
Pull Request & Info:
Unit test included
// Load up image
$img = new JImage(JPATH_SITE . '/images/joomla_green.gif');
// Set background color using JImageFilterBackgroundfill
$img->filter('backgroundfill', array('color' => '#ff0000'));
// Save image to file
$img->toFile(JPATH_SITE . '/images/joomla_green_bg.jpg', IMAGETYPE_JPEG, array('quality' => 85));
Opened On:
18 Jul 2013, 10:20 by Piotr Cz
Closed On:
23 Aug 2014, 7:52


Posted on 3 Oct 2013, 6:20 by Piotr Cz

Reference to merged Pull Request in Framework: Feature: ImageFilterBackgroundfill
Posted on 3 Oct 2013, 19:12 by Elin Waring

Since this is in the framework I'm making it RFR
Posted on 23 Aug 2014, 7:51 by Brian Teeman

Thank you for your contribution. We have now moved our tracking process to so please do not update the issue here. The link on the new tracker for this issue is