Why need to rotate the image? #14

Open
opened 2024-03-21 10:13:10 +01:00 by Benjamin_Loison · 0 comments

image.rotate(-90).show()

Does not transpose do the job?

Note that it requires an argument:

help(PIL.Image.Image.transpose)
Help on method transpose in module PIL.Image:

transpose(method) method of PIL.Image.Image instance
    Transpose image (flip or rotate in 90 degree steps)
    
    :param method: One of :py:data:`Transpose.FLIP_LEFT_RIGHT`,
      :py:data:`Transpose.FLIP_TOP_BOTTOM`, :py:data:`Transpose.ROTATE_90`,
      :py:data:`Transpose.ROTATE_180`, :py:data:`Transpose.ROTATE_270`,
      :py:data:`Transpose.TRANSPOSE` or :py:data:`Transpose.TRANSVERSE`.
    :returns: Returns a flipped or rotated copy of this image.
https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/src/commit/668057e261a530659a430220a59c2404a88dbfb1/algorithms/context-adaptive_interpolator.py#L53 Does not `transpose` do the job? Note that it requires an argument: ```py help(PIL.Image.Image.transpose) ``` ``` Help on method transpose in module PIL.Image: transpose(method) method of PIL.Image.Image instance Transpose image (flip or rotate in 90 degree steps) :param method: One of :py:data:`Transpose.FLIP_LEFT_RIGHT`, :py:data:`Transpose.FLIP_TOP_BOTTOM`, :py:data:`Transpose.ROTATE_90`, :py:data:`Transpose.ROTATE_180`, :py:data:`Transpose.ROTATE_270`, :py:data:`Transpose.TRANSPOSE` or :py:data:`Transpose.TRANSVERSE`. :returns: Returns a flipped or rotated copy of this image. ```
Benjamin_Loison added the
Context-Adaptive Interpolator
label 2024-03-21 10:13:10 +01:00
Benjamin_Loison added the
low priority
quick
labels 2024-03-26 02:15:46 +01:00
Sign in to join this conversation.
No description provided.