2020-08-04 11:25:22 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-04 11:25:22 +00:00
|
|
|
namespace Config;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
use CodeIgniter\Config\BaseConfig;
|
2021-04-02 17:20:02 +00:00
|
|
|
use CodeIgniter\Images\Handlers\GDHandler;
|
|
|
|
use CodeIgniter\Images\Handlers\ImageMagickHandler;
|
2020-05-27 18:46:16 +02:00
|
|
|
|
|
|
|
class Images extends BaseConfig
|
|
|
|
{
|
2020-06-10 15:00:12 +00:00
|
|
|
/**
|
|
|
|
* Default handler used if no other handler is specified.
|
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $defaultHandler = 'gd';
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
/**
|
2021-05-19 16:35:13 +00:00
|
|
|
* The path to the image library. Required for ImageMagick, GraphicsMagick, or NetPBM.
|
2020-06-10 15:00:12 +00:00
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $libraryPath = '/usr/local/bin/convert';
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2020-06-10 15:00:12 +00:00
|
|
|
/**
|
|
|
|
* The available handler classes.
|
|
|
|
*
|
2021-04-02 17:20:02 +00:00
|
|
|
* @var array<string, string>
|
2020-06-10 15:00:12 +00:00
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public array $handlers = [
|
2021-04-02 17:20:02 +00:00
|
|
|
'gd' => GDHandler::class,
|
|
|
|
'imagick' => ImageMagickHandler::class,
|
2020-06-10 15:00:12 +00:00
|
|
|
];
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
/*
|
2021-05-19 16:35:13 +00:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Uploaded images resizing sizes (in px)
|
2021-04-02 17:20:02 +00:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| The sizes listed below determine the resizing of images when uploaded.
|
|
|
|
| All uploaded images are of 1:1 ratio (width and height are the same).
|
2021-05-19 16:35:13 +00:00
|
|
|
*/
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public int $thumbnailSize = 150;
|
2021-05-19 16:35:13 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public int $mediumSize = 320;
|
2021-05-19 16:35:13 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public int $largeSize = 1024;
|
2020-09-08 11:45:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Size of images linked in the rss feed (should be between 1400 and 3000)
|
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public int $feedSize = 1400;
|
2020-09-08 11:45:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Size for ID3 tag cover art (should be between 300 and 800)
|
|
|
|
*/
|
2021-05-18 17:16:36 +00:00
|
|
|
public int $id3Size = 500;
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
/*
|
2021-05-19 16:35:13 +00:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Uploaded images naming extensions
|
2021-04-02 17:20:02 +00:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| The properties listed below set the name extensions for the resized images
|
2021-05-19 16:35:13 +00:00
|
|
|
*/
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $thumbnailSuffix = '_thumbnail';
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $mediumSuffix = '_medium';
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $largeSuffix = '_large';
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $feedSuffix = '_feed';
|
2020-09-08 11:45:17 +00:00
|
|
|
|
2021-05-18 17:16:36 +00:00
|
|
|
public string $id3Suffix = '_id3';
|
2020-05-27 18:46:16 +02:00
|
|
|
}
|