Skip to content

Commit 8e5298c

Browse files
ENGCOM-4378: [Catalog] [MediaStorage] Fix watermark in media application #21338
- Merge Pull Request #21338 from progreg/magento2:issue-21154 - Merged commits: 1. c7930eb 2. 7190983
2 parents 7c7d276 + 7190983 commit 8e5298c

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

app/code/Magento/MediaStorage/Service/ImageResize.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
use Magento\Framework\App\Filesystem\DirectoryList;
2525

2626
/**
27+
* Image resize service.
28+
*
2729
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2830
*/
2931
class ImageResize
@@ -123,7 +125,8 @@ public function __construct(
123125
}
124126

125127
/**
126-
* Create resized images of different sizes from an original image
128+
* Create resized images of different sizes from an original image.
129+
*
127130
* @param string $originalImageName
128131
* @throws NotFoundException
129132
*/
@@ -141,7 +144,8 @@ public function resizeFromImageName(string $originalImageName)
141144
}
142145

143146
/**
144-
* Create resized images of different sizes from themes
147+
* Create resized images of different sizes from themes.
148+
*
145149
* @param array|null $themes
146150
* @return \Generator
147151
* @throws NotFoundException
@@ -169,7 +173,8 @@ public function resizeFromThemes(array $themes = null): \Generator
169173
}
170174

171175
/**
172-
* Search the current theme
176+
* Search the current theme.
177+
*
173178
* @return array
174179
*/
175180
private function getThemesInUse(): array
@@ -187,7 +192,8 @@ private function getThemesInUse(): array
187192
}
188193

189194
/**
190-
* Get view images data from themes
195+
* Get view images data from themes.
196+
*
191197
* @param array $themes
192198
* @return array
193199
*/
@@ -211,7 +217,8 @@ private function getViewImages(array $themes): array
211217
}
212218

213219
/**
214-
* Get unique image index
220+
* Get unique image index.
221+
*
215222
* @param array $imageData
216223
* @return string
217224
*/
@@ -223,7 +230,8 @@ private function getUniqueImageIndex(array $imageData): string
223230
}
224231

225232
/**
226-
* Make image
233+
* Make image.
234+
*
227235
* @param string $originalImagePath
228236
* @param array $imageParams
229237
* @return Image
@@ -241,7 +249,8 @@ private function makeImage(string $originalImagePath, array $imageParams): Image
241249
}
242250

243251
/**
244-
* Resize image
252+
* Resize image.
253+
*
245254
* @param array $viewImage
246255
* @param string $originalImagePath
247256
* @param string $originalImageName

0 commit comments

Comments
 (0)