Title: Unexpected behaviour when passing string as orientation option · Issue #145 · blueimp/JavaScript-Load-Image · GitHub
Open Graph Title: Unexpected behaviour when passing string as orientation option · Issue #145 · blueimp/JavaScript-Load-Image
X Title: Unexpected behaviour when passing string as orientation option · Issue #145 · blueimp/JavaScript-Load-Image
Description: Original image: "blueimp-load-image": "5.16.0", When orientation is number I get proper result: const { image } = await loadImage(file, { orientation: 6, canvas: true, }); When orientation is string I get distorted image. The width ant h...
Open Graph Description: Original image: "blueimp-load-image": "5.16.0", When orientation is number I get proper result: const { image } = await loadImage(file, { orientation: 6, canvas: true, }); When orientation is strin...
X Description: Original image: "blueimp-load-image": "5.16.0", When orientation is number I get proper result: const { image } = await loadImage(file, { orientation: 6, canvas: true, }); When ...
Opengraph URL: https://github.com/blueimp/JavaScript-Load-Image/issues/145
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected behaviour when passing string as orientation option","articleBody":"Original image:\r\n\u003cimg width=\"259\" alt=\"orientatedCodePhoto\" src=\"https://user-images.githubusercontent.com/2506282/159656122-294e0141-74bc-46c2-aa8b-8cb2a3c2599c.png\"\u003e\r\n\r\n`\"blueimp-load-image\": \"5.16.0\",`\r\nWhen orientation is number I get proper result:\r\n`const { image } = await loadImage(file, {\r\n orientation: 6,\r\n canvas: true,\r\n });`\r\n\r\nWhen orientation is string I get distorted image. The width ant height dimensions are correct, but the actual image is not rotated and get somehow cropped:\r\n`const { image } = await loadImage(file, {\r\n orientation: \"6\",\r\n canvas: true,\r\n });`\r\n\r\n\r\nA fix would be maybe to throw error when non number or non boolean value is used for orientation option, or enable non integer values?\r\n","author":{"url":"https://github.com/titenis","@type":"Person","name":"titenis"},"datePublished":"2022-03-23T08:35:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/145/JavaScript-Load-Image/issues/145"}
| 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:b4a214e3-83f8-70b5-e05e-fba0731ca575 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9DA:3C35D5:14D1077:1BD35D0:697063DE |
| html-safe-nonce | a1d9ab58c62e22479713227f05b488a2bc494fe0a9db2dca62c0cfd6a5ea3b3e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOURBOjNDMzVENToxNEQxMDc3OjFCRDM1RDA6Njk3MDYzREUiLCJ2aXNpdG9yX2lkIjoiNjI4MjM2ODc1NzIwODczNjczNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4ab8ec60a2a6f00d59fdf33adbc3c187fc6ec0bc27a3275dc2ee3997ee6d77cd |
| hovercard-subject-tag | issue:1177786484 |
| 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/145/issue_layout |
| twitter:image | https://opengraph.githubassets.com/62ec4e9c8c0abc2d44a22a46c061eeead2d2ef7f89eed24333f69d6f678d5b52/blueimp/JavaScript-Load-Image/issues/145 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/62ec4e9c8c0abc2d44a22a46c061eeead2d2ef7f89eed24333f69d6f678d5b52/blueimp/JavaScript-Load-Image/issues/145 |
| og:image:alt | Original image: "blueimp-load-image": "5.16.0", When orientation is number I get proper result: const { image } = await loadImage(file, { orientation: 6, canvas: true, }); When orientation is strin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | titenis |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width