Bonjour,
J'aimerais savoir si vous connaissez une librairie capable d'appliquer une homothetie sur une image. PIL ne semble pas le faire.
Merci
Bonjour,
J'aimerais savoir si vous connaissez une librairie capable d'appliquer une homothetie sur une image. PIL ne semble pas le faire.
Merci
Une transformation affine avec PIL devrait pourtant fonctionner :
m.transform(size, AFFINE, data) => image
im.transform(size, AFFINE, data, filter) => image
Applies an affine transform to the image, and places the result in a new image with the given size.
Data is a 6-tuple (a, b, c, d, e, f) which contain the first two rows from an affine transform matrix. For each pixel (x, y) in the output image, the new value is taken from a position (a x + b y + c, d x + e y + f) in the input image, rounded to nearest pixel.
This function can be used to scale, translate, rotate, and shear the original image.
uhmmm,
en ecrire une a partir de pil n'est pas trés compliqué
une petite régle de 3, et quelques condition, non!
sinon, si je retrouve la fonction que j'ai ecrite je la metterai a dispo.
++
Partager