October\Rain\Database\Attach\Resizer

Extends:

Resizer for images

See also:

Protected properties

There are no protected properties in the class.

Show inherited protected properties

Inherited protected properties

Public methods

public void __construct($file)

__construct instantiates the Resizer and receives the path to an image we're working with

Parameters
  • $file

Show inherited public methods

Inherited public methods

Protected methods

Show inherited protected methods

Inherited protected methods

  • protected array getDimensions(int $newWidth, int $newHeight) - defined in October\Rain\Resize\Resizer. getDimensions returns the image dimensions based on the option that was chosen.
  • protected int getHeight() - defined in October\Rain\Resize\Resizer. getHeight receives the image's height while respecting.
  • protected void getOptimalCrop(int $newWidth, int $newHeight) - defined in October\Rain\Resize\Resizer. getOptimalCrop attempts to find the best way to crop. Whether crop is based on the.
  • protected mixed getOption(string $option) - defined in October\Rain\Resize\Resizer. getOption gets an individual resizer option.
  • protected int|null getOrientation(Symfony\Component\HttpFoundation\File\File $file) - defined in October\Rain\Resize\Resizer. getOrientation receives the image's exif orientation.
  • protected resource getRotatedOriginal() - defined in October\Rain\Resize\Resizer. getRotatedOriginal receives the original but rotated image.
  • protected void getSizeByAuto(int $newWidth, int $newHeight) - defined in October\Rain\Resize\Resizer. getSizeByAuto checks to see if an image is portrait or landscape and resizes accordingly.
  • protected void getSizeByFit(int $maxWidth, int $maxHeight) - defined in October\Rain\Resize\Resizer. getSizeByFit fits the image inside a bounding box using maximum width.
  • protected int getSizeByFixedHeight(int $newHeight) - defined in October\Rain\Resize\Resizer. getSizeByFixedHeight returns the width based on the image height.
  • protected int getSizeByFixedWidth(int $newWidth) - defined in October\Rain\Resize\Resizer. Returns the height based on the image width.
  • protected int getWidth() - defined in October\Rain\Resize\Resizer. getWidth receives the image's width while respecting.
  • protected mixed openImage(Symfony\Component\HttpFoundation\File\File $file) - defined in October\Rain\Resize\Resizer. openImage opens a file, detect its mime-type and create an image resource from it.
  • protected void retainImageTransparency($img) - defined in October\Rain\Resize\Resizer. retainImageTransparency manipulates an image resource in order to keep.
  • protected void setOption(string $option, mixed $value) - defined in October\Rain\Resize\Resizer. setOption sets an individual resizer option.