Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2024.1.0 #15

Merged
merged 6 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
## Unreleased
## 2024.1.0
* iOSで大きすぎる画像を処理できない問題を修正 https://github.com/misskey-dev/browser-image-resizer/issues/6
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@misskey-dev/browser-image-resizer",
"version": "2023.12.0",
"version": "2024.1.0",
"description": "A browser-based utility to downscale and resize images using OffscreenCanvas",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/scaling_operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export async function scaleImage({ img, config }: {
*/
if (isIos() && bmp.width * bmp.height > 16777216) {
const scale = Math.sqrt(16777216 / (bmp.width * bmp.height));
if (config.debug) console.log(`browser-image-resizer: scale: Image is too large in iOS WebKit}`);
if (config.debug) console.log(`browser-image-resizer: scale: Image is too large in iOS WebKit`);
converting = new OffscreenCanvas(Math.floor(bmp.width * scale), Math.floor(bmp.height * scale));
converting.getContext('2d')?.drawImage(bmp, 0, 0, converting.width, converting.height);
} else {
Expand Down