Skip to content

Remove whitespace from otherwise empty lines #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
1 commit merged into from Mar 27, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/ImageResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ImageResize
const CROPBOTTOM = 3;
const CROPLEFT = 4;
const CROPRIGHT = 5;

public $quality_jpg = 75;
public $quality_png = 0;

Expand Down Expand Up @@ -94,7 +94,7 @@ public function __construct($filename)

return $this->resize($this->getSourceWidth(), $this->getSourceHeight());
}

/**
* Saves new image
*
Expand Down Expand Up @@ -216,7 +216,7 @@ public function output($image_type = null, $quality = null)

$this->save(null, $image_type, $quality);
}

/**
* Resizes image according to the given height (width proportional)
*
Expand All @@ -233,7 +233,7 @@ public function resizeToHeight($height, $allow_enlarge = false)

return $this;
}

/**
* Resizes image according to the given width (height proportional)
*
Expand Down Expand Up @@ -299,7 +299,7 @@ public function resize($width, $height, $allow_enlarge = false)

return $this;
}

/**
* Crops image according to the given width, height and crop position
*
Expand All @@ -324,10 +324,10 @@ public function crop($width, $height, $allow_enlarge = false, $position = self::
$height = $this->getSourceHeight();
}
}

$ratio_source = $this->getSourceWidth() / $this->getSourceHeight();
$ratio_dest = $width / $height;

if ($ratio_dest < $ratio_source) {
$this->resizeToHeight($height, $allow_enlarge);

Expand All @@ -350,7 +350,7 @@ public function crop($width, $height, $allow_enlarge = false, $position = self::

return $this;
}

/**
* Gets source width
*
Expand All @@ -360,7 +360,7 @@ public function getSourceWidth()
{
return $this->original_w;
}

/**
* Gets source height
*
Expand Down Expand Up @@ -389,7 +389,7 @@ public function getDestHeight()
{
return $this->dest_h;
}

/**
* Gets crop position (X or Y) according to the given position
*
Expand Down