Title: How are maxWidth and maxHeight supposed to work? · Issue #150 · blueimp/JavaScript-Load-Image · GitHub
Open Graph Title: How are maxWidth and maxHeight supposed to work? · Issue #150 · blueimp/JavaScript-Load-Image
X Title: How are maxWidth and maxHeight supposed to work? · Issue #150 · blueimp/JavaScript-Load-Image
Description: If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024, so the other can exceed its max value. ...
Open Graph Description: If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024,...
X Description: If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024,...
Opengraph URL: https://github.com/blueimp/JavaScript-Load-Image/issues/150
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How are maxWidth and maxHeight supposed to work?","articleBody":"If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024, so the other can exceed its max value. Also, the library stretches the image even if it is smaller.\r\n\r\nAs an example, I have an input image that is 3560x942. The resulting image is 3869x1024, which is even bigger than the original, and the width is over 3x larger than the maxWidth.\r\n\r\nThis also happens if I set the maxHeight to 1024 only, i.e. without a maxWidth.\r\n\r\nI would expect that maxWidth and maxHeight are maximum values, not minimum values?","author":{"url":"https://github.com/derwaldgeist","@type":"Person","name":"derwaldgeist"},"datePublished":"2024-08-28T08:32:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/150/JavaScript-Load-Image/issues/150"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a132c4b8-6294-07db-b8c1-1c2b361487a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B91A:1298D8:286A147:367D946:69704B9B |
| html-safe-nonce | eb350f1f34655546d54afdd53eb24f6515d75f717f807e90fb4da6d70c954f97 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTFBOjEyOThEODoyODZBMTQ3OjM2N0Q5NDY6Njk3MDRCOUIiLCJ2aXNpdG9yX2lkIjoiNjU4MjYwNjY4NTA5OTAxOTE2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a4a1f19717fbfd48e318a1011295b6fb3d898de7053ead681dff772ccf9b5fe8 |
| hovercard-subject-tag | issue:2491437308 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/blueimp/JavaScript-Load-Image/150/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd821bd3ba8eb4ed9fe9be9d9564ee4401f9245c0020f7b564bf255e9c43341c/blueimp/JavaScript-Load-Image/issues/150 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd821bd3ba8eb4ed9fe9be9d9564ee4401f9245c0020f7b564bf255e9c43341c/blueimp/JavaScript-Load-Image/issues/150 |
| og:image:alt | If I am calling loadImage with maxWidth = 1024, maxHeigth = 1024, I would expect that the neither the width nor the height exceed 1024. Instead, the library seems to set the shorter length to 1024,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | derwaldgeist |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/blueimp/JavaScript-Load-Image git https://github.com/blueimp/JavaScript-Load-Image.git |
| octolytics-dimension-user_id | 244586 |
| octolytics-dimension-user_login | blueimp |
| octolytics-dimension-repository_id | 2967938 |
| octolytics-dimension-repository_nwo | blueimp/JavaScript-Load-Image |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2967938 |
| octolytics-dimension-repository_network_root_nwo | blueimp/JavaScript-Load-Image |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f643964067a552f02067066d6a910b2f90a5721f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width