diff --git a/CImage.php b/CImage.php
index 242f43f..22f5a32 100644
--- a/CImage.php
+++ b/CImage.php
@@ -167,6 +167,13 @@ class CImage
private $newHeightOrig; // Save original value
+ /**
+ * Array with details on how to crop, incoming as argument and calculated.
+ */
+ public $crop;
+ public $cropOrig; // Save original value
+
+
/**
* Properties (clean up these)
*/
@@ -174,7 +181,6 @@ class CImage
public $keepRatio;
public $cropToFit;
- public $crop;
private $cropWidth;
private $cropHeight;
@@ -388,8 +394,10 @@ class CImage
$this->{$key} = $args[$key];
}
+ // Save original values to enable re-calculating
$this->newWidthOrig = $this->newWidth;
$this->newHeightOrig = $this->newHeight;
+ $this->cropOrig = $this->crop;
return $this;
}
@@ -642,6 +650,7 @@ class CImage
$this->newWidth = $this->newWidthOrig;
$this->newHeight = $this->newHeightOrig;
+ $this->crop = $this->cropOrig;
$this->initDimensions()
->calculateNewWidthAndHeight();
diff --git a/webroot/test_issue36.php b/webroot/test_issue36_aro.php
similarity index 94%
rename from webroot/test_issue36.php
rename to webroot/test_issue36_aro.php
index b8e441f..d845738 100644
--- a/webroot/test_issue36.php
+++ b/webroot/test_issue36_aro.php
@@ -1,13 +1,13 @@
- Testing img for issue 36
+ Testing img for issue 36 - autoRotate
-Testing issue 36
+Testing issue 36 - autoRotate
+
+
+ Testing img for issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+Testing issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+
+Images used in test
+
+The following images are used for this test.
+
+
+ =$image?>
+
+
+
+
+
+Testcases used for each image
+
+The following testcases are used for each image.
+
+
+ =$tc?>
+
+
+
+
+Applying testcase for each image
+
+
+=$image?>
+
+=$image?>
+
+
+
+=$tc?>
+
+=$image . $tc?>
+
+
+
+
+
diff --git a/webroot/test_issue36_rb-ra-270.php b/webroot/test_issue36_rb-ra-270.php
new file mode 100644
index 0000000..f5d0823
--- /dev/null
+++ b/webroot/test_issue36_rb-ra-270.php
@@ -0,0 +1,76 @@
+
+
+
+ Testing img for issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+Testing issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+
+Images used in test
+
+The following images are used for this test.
+
+
+ =$image?>
+
+
+
+
+
+Testcases used for each image
+
+The following testcases are used for each image.
+
+
+ =$tc?>
+
+
+
+
+Applying testcase for each image
+
+
+=$image?>
+
+=$image?>
+
+
+
+=$tc?>
+
+=$image . $tc?>
+
+
+
+
+
diff --git a/webroot/test_issue36_rb-ra-45.php b/webroot/test_issue36_rb-ra-45.php
new file mode 100644
index 0000000..adbf1fe
--- /dev/null
+++ b/webroot/test_issue36_rb-ra-45.php
@@ -0,0 +1,78 @@
+
+
+
+ Testing img for issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+Testing issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+
+Images used in test
+
+The following images are used for this test.
+
+
+ =$image?>
+
+
+
+
+
+Testcases used for each image
+
+The following testcases are used for each image.
+
+
+ =$tc?>
+
+
+
+
+Applying testcase for each image
+
+
+=$image?>
+
+=$image?>
+
+
+
+=$tc?>
+
+=$image . $tc?>
+
+
+
+
+
diff --git a/webroot/test_issue36_rb-ra-90.php b/webroot/test_issue36_rb-ra-90.php
new file mode 100644
index 0000000..8a90cab
--- /dev/null
+++ b/webroot/test_issue36_rb-ra-90.php
@@ -0,0 +1,76 @@
+
+
+
+ Testing img for issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+Testing issue 36 - rotateBefore, rotateAfter =$angle?>
+
+
+
+
+Images used in test
+
+The following images are used for this test.
+
+
+ =$image?>
+
+
+
+
+
+Testcases used for each image
+
+The following testcases are used for each image.
+
+
+ =$tc?>
+
+
+
+
+Applying testcase for each image
+
+
+=$image?>
+
+=$image?>
+
+
+
+=$tc?>
+
+=$image . $tc?>
+
+
+
+
+