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

画像の縮小先解像度を選択可能にする #182

Open
Sayamame-beans opened this issue Apr 23, 2024 · 16 comments · Fixed by #193
Open

画像の縮小先解像度を選択可能にする #182

Sayamame-beans opened this issue Apr 23, 2024 · 16 comments · Fixed by #193
Labels
✨Feature This adds/improves/enhances a feature niri-la This issue or pull request is related to original features of misskey.niri.la

Comments

@Sayamame-beans
Copy link

概要

Related: #60
画像の縮小先解像度を、2K(2048), WQHD(2560), 4K(4096), 8K(8192)から選択可能にする

目的

利便性の向上

@Sayamame-beans Sayamame-beans added the ✨Feature This adds/improves/enhances a feature label Apr 23, 2024
@Sayamame-beans
Copy link
Author

それに伴って、現在の制限4096を8192に引き上げたいなとも思っています

@Sayamame-beans Sayamame-beans added the niri-la This issue or pull request is related to original features of misskey.niri.la label May 2, 2024
@Sayamame-beans
Copy link
Author

素で上限を2560にした結果、VRCImageDownloaderが2048までしか対応していないため、Misskeyにリサイズありで上げた画像が読み込めない問題が起きるようになったようです。

The maximum resolution is 2048 × 2048 pixels. Attempting to download larger images will result in an error.
https://creators.vrchat.com/worlds/udon/image-loading/#before-you-begin

@anatawa12
Copy link
Collaborator

これはまぁ観測してはいるんだけどmisskeyにあげて調整するのもなんか違う気もしていてうーんどうしようかぁってなってる

@Sayamame-beans
Copy link
Author

それはそうで、間に挟んで変換出来るようにするのも検討(永続保持は不要)

@Sayamame-beans
Copy link
Author

なんか2048上限残ってる?

image = this.imageProcessingService.convertToWebpStream(file.path, 2048, 2048);

@anatawa12
Copy link
Collaborator

svgの変換は忘れてた

@Sayamame-beans
Copy link
Author

svg: サーバー側の解像度上限に合わせても良い…けど、上限を8192にすると、svgがむやみに8K画像になりそう

@Sayamame-beans
Copy link
Author

りらさんと話して、svgは固定値4096に
webpublic上限は8192に

@anatawa12
Copy link
Collaborator

svg、固定値なの?svg指定のwidth/heightではなく?

@Sayamame-beans
Copy link
Author

オリジナル解像度ってこと…?

@anatawa12
Copy link
Collaborator

はい。webpにも画像サイズの概念はあるので

@Sayamame-beans
Copy link
Author

なるほど。じゃあその方が良いかも…(上限は他のと同じで)

@anatawa12
Copy link
Collaborator

https://misskey.niri.la/notes/9tqr07evzd

これ、私のアイコンのsvgなのですが、256x256になってますね。↓の部分を使ってるはず

https://github.com/anatawa12/anatawa12/blob/master/icons/icon-circle.svg?short_path=2f8fe44#L1C67-L1C88

@Sayamame-beans
Copy link
Author

メモ: 上限値を他と同じ変数参照に

@Sayamame-beans
Copy link
Author

WebPublicとsvg

@Sayamame-beans
Copy link
Author

サーバー側での処理に影響する設定はscopeが["client", "base"]のregistryApiServiceっぽい。
でも実際のやり方は前回と同じdefaultStoreでwhere: 'account'で良いっぽい。

imageCompressionMode: {
where: 'account',
default: 'noResizeCompress' as 'resizeCompress' | 'noResizeCompress' | 'resizeCompressLossy' | 'noResizeCompressLossy',
},
imageResizeSize: {
where: 'account',
default: '2560',
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature niri-la This issue or pull request is related to original features of misskey.niri.la
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants