Skip to content

Commit ca1fbc2

Browse files
committed
Merge pull request #6 from cainmi/pull-6
Set up initial dimensions on load, so we can save without resizing
2 parents 2c810da + fdb8051 commit ca1fbc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ImageResize.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct($filename)
3131
$this->load($filename);
3232
}
3333

34-
public function load($filename)
34+
protected function load($filename)
3535
{
3636
$image_info = getimagesize($filename);
3737

@@ -63,7 +63,7 @@ public function load($filename)
6363
break;
6464
}
6565

66-
return $this;
66+
return $this->resize($this->getSourceWidth(), $this->getSourceHeight());
6767
}
6868

6969
public function save($filename, $image_type = null, $quality = null, $permissions = null)

0 commit comments

Comments
 (0)