Skip to content

Instantly share code, notes, and snippets.

@MacDada
Created January 10, 2014 20:32
Show Gist options
  • Select an option

  • Save MacDada/8362024 to your computer and use it in GitHub Desktop.

Select an option

Save MacDada/8362024 to your computer and use it in GitHub Desktop.
<?php
if (!class_exists('Imagick')) {
class Imagick
{
const FILTER_LANCZOS = 1;
private $path;
public function __construct($path)
{
if (!is_file($path)) {
throw new RuntimeException('File not found: '.$path);
}
$this->path = $path;
}
public function getImageWidth()
{
$size = getimagesize($this->path);
return $size[0];
}
public function getImageHeight()
{
$size = getimagesize($this->path);
return $size[1];
}
public function writeImage($path)
{
copy($this->path, $path);
}
public function cropImage()
{
}
public function setImageCompressionQuality()
{
}
public function resizeImage()
{
}
public function compositeImage()
{
}
public function getImageCompose()
{
}
public function destroy()
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment