coresphereweb / loremimage
Random image system for PHP
1.1.2
2017-11-14 06:27 UTC
Requires
- php: >=5.2.2
This package is not auto-updated.
Last update: 2025-02-01 22:40:02 UTC
README
It requires PHP 5.2+ and is licensed under the New BSD License. You can obtain the latest version from our GitHub repository or install it via Composer:
composer require coresphereweb/loremimage
Usage
Render:
$lorem = new \LoremImage\LoremImage(); $lorem->setPathUrl('/loremimage/'); $lorem->setPathImages(PATH . 'img/loremimage/'); $lorem->render();
Conditions by _GET
- b[/b] w - width to resize
- (int) h - height to resize
- (string) category(s) (folder in setPathImages())
- (int) picture
- (string) effect
- (int) qtd
- (bool) hierarchy - By default is active, when is false the system stop reading subcategories from category father.
- (string) resize - crop (default), fill or proportional
Effects
- pixelate*
- smooth*
- noise*
- negative
- emboss*
- edge*
- contrast
- colorize
- grayscale
- brightness
- blur*
- blur2*
- sharpen
- This effects respond to _GET['qtd'], with recursive does the same procedure by a number inputed. Be carefoul, the higher is the number, more consuming and slower.
Routes (optional)
- width and height: /loremimage/r/600/400
- category: /loremimage/cars
- width, height and category: /loremimage/600/400/cars
- width, height, category and select picture by ASC: /loremimage/600/400/cars/1
- IMPORTANT: .htaccess is necessary to routes work
(c) Coresphere Tecnologia, 2016 (http://coresphe.re)