Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88355

Re: Image rotation issue

References <baa02843-6a54-440d-a404-552af28c5816@googlegroups.com>
Date 2015-03-31 10:47 +1100
Subject Re: Image rotation issue
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.355.1427759276.10327.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Mar 31, 2015 at 8:22 AM,  <kai.peters@gmail.com> wrote:
> rotimg = img.rotate(270) # rotation is counterclockwise

Unless the 90 and 270 cases are documented as being handled specially,
I'd look for a dedicated function for doing those changes. A quick
perusal of the docs showed up this:

http://pillow.readthedocs.org/en/latest/reference/Image.html#PIL.Image.Image.transpose

Is that any better, or is that doing the exact same thing as rotate()?

By the way:

> The black & white only device (1024 (X) x 1280 (Y)) expects the compressed data based on portrait mode, i.e. 8 pixels combined into one bytes for 1280 rows of 128 bytes.
>

This sounds to me like the fax standard. I wonder, can you make use of
a TIFF library to do some of your work for you?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Image rotation issue kai.peters@gmail.com - 2015-03-30 14:22 -0700
  Re: Image rotation issue Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-30 15:32 -0600
  Re: Image rotation issue Chris Angelico <rosuav@gmail.com> - 2015-03-31 10:47 +1100
    Re: Image rotation issue high5storage@gmail.com - 2015-03-30 21:04 -0700
      Re: Image rotation issue Chris Angelico <rosuav@gmail.com> - 2015-03-31 15:09 +1100

csiph-web