agusmakmun / agusmakmun/django-image-optimizer

Make it possible to not add background

Ouverte
#11 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
25
Forks
11
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.