CoreFiles by mySites.guru
Grayscale.php39 lines, 882 bytes, from Joomla_4.2.9-Stable-Full_Package.zip
Raw History Compare with 4.2.8
md5
ccfac82249a5b885d12a69db9d2e870a
sha1
3ba2be86982f7fd8c5f81c96633b77af37bab75f
sha256
a369d4693f3d4ad0cc4d3e61a9fb8e33b112a30489fd3f221f278728700efba3
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright   (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Image\Filter;

use Joomla\CMS\Image\ImageFilter;

// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Image Filter class to transform an image to grayscale.
 *
 * @since  2.5.0
 */
class Grayscale extends ImageFilter
{
    /**
     * Method to apply a filter to an image resource.
     *
     * @param   array  $options  An array of options for the filter.
     *
     * @return  void
     *
     * @since   2.5.0
     */
    public function execute(array $options = [])
    {
        // Perform the grayscale filter.
        imagefilter($this->handle, IMG_FILTER_GRAYSCALE);
    }
}

The same content is in 27 releases, Joomla 4.2.1 to 4.3.1. See them all, or every version of this file.