agusmakmun / agusmakmun/django-image-optimizer

Make it possible to not add background

オープン
#11 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
25
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi!

I want to specify a maximum size for my images (let's say 1000px width and 1000px height). Then I did this:

```python
image = OptimizedImageField(
optimized_image_output_size=(1000, 1000),
optimized_image_resize_method='thumbnail'
)
```

When I upload a rectangle image (like 4000px*2000px), the field adds a white border around it to get a 1000*1000px image whereas I want 1000px to be the **maximum**, not the exact size.

The problem is here: https://github.com/agusmakmun/django-image-optimizer/blob/master/image_optimizer/utils.py#L68

Why don't you use the output of `resizeimage` directly, which has the right size?

Thanks

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。