JSFiddle - React, Tailwind, and code Playground

by techydude

HTML

<?php
/*
  <?php
/*
    TimThumb script created by Tim McDaniels and Darren Hoyt with tweaks by Ben Gillbanks
    http://code.google.com/p/timthumb/

    MIT License: http://www.opensource.org/licenses/mit-license.php

    Paramters
    ---------
    w: width
    h: height
    zc: zoom crop (0 or 1)
    q: quality (default is 75 and max is 100)
   
    HTML example: <img src="/scripts/timthumb.php?src=/images/whatever.jpg&w=150&h=200&zc=1" alt="" />
*/

/*
$sizeLimits = array(
    "100x100",
    "150x150",
);

error_reporting(E_ALL);
ini_set("display_errors", 1);
*/

// check to see if GD function exist
if(!function_exists('imagecreatetruecolor')) {
    displayError('GD Library Error: imagecreatetruecolor does not exist - please contact your webhost and ask them to install the GD library');
}

define ('CACHE_SIZE', 250);                                     // number of files to store before clearing cache
define ('CACHE_CLEAR', 5);                                      // maximum number of files to delete on each cache clear
define ('VERSION', '1.14');                                     // version number (to force a cache refresh)
define ('DIRECTORY_CACHE', './cache');          // cache directory
define ('DIRECTORY_TEMP', './temp');            // temp directory

if (function_exists('imagefilter') && defined('IMG_FILTER_NEGATE')) {
        $imageFilters = array(
                "1" => array(IMG_FILTER_NEGATE, 0),
                "2" => array(IMG_FILTER_GRAYSCALE, 0),
                "3" => array(IMG_FILTER_BRIGHTNESS, 1),
                "4" => array(IMG_FILTER_CONTRAST, 1),
                "5" => array(IMG_FILTER_COLORIZE, 4),
                "6" => array(IMG_FILTER_EDGEDETECT, 0),
                "7" => array(IMG_FILTER_EMBOSS, 0),
                "8" => array(IMG_FILTER_GAUSSIAN_BLUR, 0),
                "9" => array(IMG_FILTER_SELECTIVE_BLUR, 0),
                "10" => array(IMG_FILTER_MEAN_REMOVAL, 0),
                "11" => array(IMG_FILTER_SMOOTH, 0),
   ...