projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8576b35
)
DataObjects/Images.php
author
Edward
<edward@roojs.com>
Fri, 12 Oct 2018 02:55:45 +0000
(10:55 +0800)
committer
Edward
<edward@roojs.com>
Fri, 12 Oct 2018 02:55:45 +0000
(10:55 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
1af610b
..
96b7c88
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-830,6
+830,10
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
$data = file_get_contents($file);
$data = file_get_contents($file);
+ if($rotate){
+ $data = $this->rotate();
+ }
+
if(!empty($scaleWidth) || !empty($scaleHeight)){
$width = $this->width;
if(!empty($scaleWidth) || !empty($scaleHeight)){
$width = $this->width;
@@
-866,10
+870,6
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
}
}
- if($rotate){
- $data = $this->rotate();
- }
-
$base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
return $base64;
$base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
return $base64;
@@
-915,7
+915,7
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
}
$orientation = $imagick->getImageOrientation();
}
$orientation = $imagick->getImageOrientation();
-
+ print_R($orientation);exit;
switch($orientation) {
case Imagick::ORIENTATION_BOTTOMRIGHT:
$imagick->rotateimage(new ImagickPixel('#00000000'), 180); // rotate 180 degrees
switch($orientation) {
case Imagick::ORIENTATION_BOTTOMRIGHT:
$imagick->rotateimage(new ImagickPixel('#00000000'), 180); // rotate 180 degrees