agusmakmun / agusmakmun/django-image-optimizer

Make it possible to not add background

Đang mở
#11 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
25
Fork
11
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.