Drawing methods edges aren't smooth

Ouverte
#5,960 4 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
python

Piste de recherche

Start with Pillow's drawing methods, especially the .ellipse() entry point described in the issue, and compare its edges with the existing Image.ANTIALIAS resize approach. Determine the intended antialiasing behavior for curves and lines, then validate the result against the reported pixelation example and define coverage for other drawing methods.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Enhancement

Originally posted by @radarhere in https://github.com/python-pillow/Pillow/issues/4895#issuecomment-1013763728

@DeusAres could you create a new issue with more detail?

In general the drawing methods don't have an antialiasing method, meaning that curves and lines that aren't straight are affected by pixelation:

I'm asking if there will be an implemention, like kerneling the drawn figures with methods such gaussian blur and to apply antialiasing so super-sampling can be avoided

The way that I use to superSample is to resize N times (2<=N<=8) the width and height and resize it back with Image.ANTIALIAS resampling

Taking this image in account:

image

It's a simple circle using .ellipse() method on a 1000x1000 canvas but the edges aren't smooth because of the pixelation. The bigger the figure the less it's noticeable of course but that isn't the way to solve the issue

Langage dominant
Python
Étoiles
14k
Forks
2.6k
Merge moyen
1 j 1 h
PR mergées (30 j)
205

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de python-pillow/Pillow

Toutes les issues de python-pillow/Pillow

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

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