@christianriedl/media 1.0.69 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -95,10 +95,18 @@
95
95
  const pictureQuality = mediaAppConfig.pictureQuality;
96
96
  const quality = getQuality(pictureQuality);
97
97
  const factor = getFactor(pictureQuality);
98
- if (landscape.value)
99
- return mediaService.getPhotoUrl(url.value, item.Url, `${0}x${height.value * factor}x${item.Orientation}x${quality}`);
100
- else
101
- return mediaService.getPhotoUrl(url.value, item.Url, `${width.value * factor}x${0}x${item.Orientation}x${quality}`);
98
+ if (landscape.value) {
99
+ let h = height.value * factor;
100
+ if (item.Height <= h)
101
+ h = 0;
102
+ return mediaService.getPhotoUrl(url.value, item.Url, `${0}x${h}x${item.Orientation}x${quality}`);
103
+ }
104
+ else {
105
+ let w = width.value * factor;
106
+ if (item.Width <= w)
107
+ w = 0;
108
+ return mediaService.getPhotoUrl(url.value, item.Url, `${w}x${0}x${item.Orientation}x${quality}`);
109
+ }
102
110
  }
103
111
  function getHeight(item: IPictureFile) {
104
112
  const pictureQuality = mediaAppConfig.pictureQuality;