|
@@ -73,7 +73,7 @@ discard block |
|
|
block discarded – undo |
|
73
|
73
|
//for getting non high dpi measurements, as the document is on 72 dpi. |
|
74
|
74
|
//TODO: this should be improved. it does not really need the resampling to identify the new sizes. |
|
75
|
75
|
//instead this should just be calculated, as resampling the image is too process instensive. |
|
76
|
|
- $img_rework->resize($w, $h, function ($constraint) { |
|
|
76
|
+ $img_rework->resize($w, $h, function($constraint) { |
|
77
|
77
|
$constraint->aspectRatio(); |
|
78
|
78
|
$constraint->upsize(); |
|
79
|
79
|
}); |
|
@@ -82,7 +82,7 @@ discard block |
|
|
block discarded – undo |
|
82
|
82
|
|
|
83
|
83
|
//for storing the image in high dpi, so it has good quality on high dpi screens |
|
84
|
84
|
$high_dpi = 160; |
|
85
|
|
- $img_rework2->resize(((int)$w*($high_dpi/72)), $h, function ($constraint) { // make high dpi version for actual storage |
|
|
85
|
+ $img_rework2->resize(((int) $w * ($high_dpi / 72)), $h, function($constraint) { // make high dpi version for actual storage |
|
86
|
86
|
$constraint->aspectRatio(); |
|
87
|
87
|
$constraint->upsize(); |
|
88
|
88
|
}); |
|
@@ -90,7 +90,7 @@ discard block |
|
|
block discarded – undo |
|
90
|
90
|
|
|
91
|
91
|
//set dpi of image to high dpi |
|
92
|
92
|
$im = new \imagick(); |
|
93
|
|
- $im->setResolution($high_dpi,$high_dpi); |
|
|
93
|
+ $im->setResolution($high_dpi, $high_dpi); |
|
94
|
94
|
$im->readImage($parent->StoragePath($parent->local_path.'word/media/'.$imgs[$k]['img_file_dest'])); |
|
95
|
95
|
$im->writeImage($parent->StoragePath($parent->local_path.'word/media/'.$imgs[$k]['img_file_dest'])); |
|
96
|
96
|
$im->clear(); |