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

スピーカーの画像が圧縮しています。 #158

Closed
martinheidegger opened this issue Nov 9, 2018 · 0 comments
Closed

スピーカーの画像が圧縮しています。 #158

martinheidegger opened this issue Nov 9, 2018 · 0 comments
Labels
💇🏻‍♀️ 綺麗になれ! 見た目がさらに綺麗になるために。 😱 ゴキブリ!🐛 バグ見つかりました!

Comments

@martinheidegger
Copy link
Contributor

(The speaker image is compressed)

スピーカー一覧には正方形のスピーカー画像が上下か左右に圧縮されています。
If the speakers image is not square, it gets compressed either vertically or horizontally.

screen shot 2018-11-09 at 18 27 37

#157 を対応できたらこの問題もなくなるかもしれません。#157 を無視すると npm run update-speakers スクリプトで画像を正方形に切ることも可能だと思います。そうすると Popup の時にも切られていますので二つのバーションを保村しないといけないと思います。

Fixing #157 might fix this issue as well. But putting #157 aside it would also be possible to change the npm run update-speakers script to cut the image to a square. However this would also change the popup-display, which means we would need to store two versions of the image (one cut, one not-cut).

const imgBuffer = await res.buffer();
await sharp(imgBuffer)
.resize(512, 512, { fit: 'outside', withoutEnlargement: true })
.toFile(filePath);

@martinheidegger martinheidegger added 😱 ゴキブリ!🐛 バグ見つかりました! 💇🏻‍♀️ 綺麗になれ! 見た目がさらに綺麗になるために。 labels Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💇🏻‍♀️ 綺麗になれ! 見た目がさらに綺麗になるために。 😱 ゴキブリ!🐛 バグ見つかりました!
Projects
None yet
Development

No branches or pull requests

1 participant