Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • DateTime
  • Directory
  • File
  • Image
  • Mailer
  • SQL
  • YAML

Class Image

Contains helper methods concerned with image manipulation.

Namespace: Core\Helpers
Located at helpers/image.php

Methods summary

public static array
# createCroppedThumbnail( string $imagePath, array $thumbsSizes, integer $quality = 95 )

Generate one or more center cropped thumbnails given thumbnail sizes.

Generate one or more center cropped thumbnails given thumbnail sizes.

Parameters

$imagePath
Path to the input image file.
$thumbsSizes
Array with thumb sizes. Example: ['150x150', '240x320', '640x480'].
$quality
Image compression quality (only for JPG and PNG).

Returns

array
Of paths to the newly created thumbnails.

Uses

self::createThumbnail To create a thumbnail from the given image.
public static array
# createScaledThumbnail( string $imagePath, array $thumbsSizes, integer $quality = 95 )

Generate one or more scaled thumbnails that fit in the given sizes.

Generate one or more scaled thumbnails that fit in the given sizes.

Parameters

$imagePath
Path to the input image file.
$thumbsSizes
Array with thumb sizes. Example: ['150x150', '240x320', '640x480'].
$quality
Image compression quality (only for JPG and PNG).

Returns

array
Of paths to the newly created thumbnails.

Uses

self::createThumbnail To create a thumbnail from the given image.
public static array
# getSize( string $imagePath )

Gets image size and aspect ratio.

Gets image size and aspect ratio.

Parameters

$imagePath
Image file path.

Returns

array
With width, height, and aspect ratio.
public static string
# getThumbnailFilePath( string $imagePath, string $size, string $type )

Retrieve thumbnail file path.

Retrieve thumbnail file path.

Parameters

$imagePath
Path to the original image file.
$size
Thumbnail size.
$type
Thumbnail type.

Returns

string
private static array
# createThumbnail( string $imagePath, array $thumbsSizes, integer $quality, string $mode )

Generate one or more thumbnails of an input file.

Generate one or more thumbnails of an input file.

Parameters

$imagePath
Path to the input image file.
$thumbsSizes
Array with thumb sizes. Example: ['150x150', '240x320', '640x480'].
$quality
Image compression quality (only for JPG and PNG).
$mode
Used by thumbnail creation. Can be either inset or outbound.

Returns

array
Of paths to the newly created thumbnails.
Silla.IO API API documentation generated by ApiGen