librelist archives

« back to archive

exif orientation

exif orientation

From:
Nicolas de Bari Embriz Garcia Rojas
Date:
2013-12-16 @ 14:19
How to rotate an image based on the exif:Orientation value ?


Based on this site: http://jpegclub.org/exif_orientation.html

This are the values for Orientation:

Value    0th Row    0th Column
1    top    left side
2    top    right side
3    bottom    right side
4    bottom    left side
5    left side    top
6    right side    top
7    right side    bottom
8    left side    bottom


So for example if I get a 1 how to check / re-orientante the image to be
in orientation 1.



regards.

Re: [wand] exif orientation

From:
Timur Tabi
Date:
2013-12-16 @ 23:59
Nicolas de Bari Embriz Garcia Rojas wrote:
>
>
> So for example if I get a 1 how to check / re-orientante the image to be
> in orientation 1.

Are you asking how to READ the exif information from the image?  Or are 
you asking how to use that number to determine how to rotate it?

Re: [wand] exif orientation

From:
Nicolas de Bari Embriz Garcia Rojas
Date:
2013-12-17 @ 10:19
I can read the exif but based on the orientation if any, to rotate the 
image based on the number.

right now I am using this code: 


https://github.com/nbari/my-sandbox/blob/master/python/wand/exif/apply_orientation.py

But wondering if there is something internal that can simple just rotate 
the image based on the exif, maybe something like

img.rotate(exif:orientation)


regards.

On Dec 16, 2013, at 11:59 PM, Timur Tabi <timur@tabi.org> wrote:

> Nicolas de Bari Embriz Garcia Rojas wrote:
>> 
>> 
>> So for example if I get a 1 how to check / re-orientante the image to be
>> in orientation 1.
> 
> Are you asking how to READ the exif information from the image?  Or are 
> you asking how to use that number to determine how to rotate it?

Re: [wand] exif orientation

From:
Hong Minhee
Date:
2013-12-17 @ 15:51
Hi Nicolas,

Wand currently doesn’t provide any such function that automatically 
rotates the image based on its EXIF orientation metadata, but it seems 
possible to be implemented in the future.  How could be the interface?  It
would work in that way when rotate() doesn’t take any arguments.  Any 
ideas?


Thanks,
Minhee

On Dec 17, 2013, at 7:19 PM, Nicolas de Bari Embriz Garcia Rojas 
<nbari@inbox.im> wrote:

> I can read the exif but based on the orientation if any, to rotate the 
image based on the number.
> 
> right now I am using this code: 
> 
> 
https://github.com/nbari/my-sandbox/blob/master/python/wand/exif/apply_orientation.py
> 
> But wondering if there is something internal that can simple just rotate
the image based on the exif, maybe something like
> 
> img.rotate(exif:orientation)
> 
> 
> regards.
> 
> On Dec 16, 2013, at 11:59 PM, Timur Tabi <timur@tabi.org> wrote:
> 
>> Nicolas de Bari Embriz Garcia Rojas wrote:
>>> 
>>> 
>>> So for example if I get a 1 how to check / re-orientante the image to be
>>> in orientation 1.
>> 
>> Are you asking how to READ the exif information from the image?  Or are 
>> you asking how to use that number to determine how to rotate it?
> 

Re: [wand] exif orientation

From:
Nicolas de Bari Embriz Garcia Rojas
Date:
2013-12-17 @ 16:06
Hi, maybe using something like:

  with Image(filename=src_image) as image: 
        image.exif_rotate()

Where exif_rotate automatically based on the image.orientation ir any,
applies the rotation, currently I have been testing with this:

https://github.com/nbari/my-sandbox/tree/master/python/wand/exif

I have some examples that maybe could help.

regards.










On 12/17/2013 15:51, Hong Minhee wrote:
> Hi Nicolas,
>
> Wand currently doesn’t provide any such function that automatically 
rotates the image based on its EXIF orientation metadata, but it seems 
possible to be implemented in the future.  How could be the interface?  It
would work in that way when rotate() doesn’t take any arguments.  Any 
ideas?
>
>
> Thanks,
> Minhee
>
> On Dec 17, 2013, at 7:19 PM, Nicolas de Bari Embriz Garcia Rojas 
<nbari@inbox.im> wrote:
>
>> I can read the exif but based on the orientation if any, to rotate the 
image based on the number.
>>
>> right now I am using this code: 
>>
>> 
https://github.com/nbari/my-sandbox/blob/master/python/wand/exif/apply_orientation.py
>>
>> But wondering if there is something internal that can simple just 
rotate the image based on the exif, maybe something like
>>
>> img.rotate(exif:orientation)
>>
>>
>> regards.
>>
>> On Dec 16, 2013, at 11:59 PM, Timur Tabi <timur@tabi.org> wrote:
>>
>>> Nicolas de Bari Embriz Garcia Rojas wrote:
>>>>
>>>> So for example if I get a 1 how to check / re-orientante the image to be
>>>> in orientation 1.
>>> Are you asking how to READ the exif information from the image?  Or are 
>>> you asking how to use that number to determine how to rotate it?

Re: [wand] exif orientation

From:
Hong Minhee
Date:
2013-12-17 @ 16:09
Cool!  It would be great if your examples are included in sample/ 
directory of the official repository:

  https://github.com/dahlia/wand/tree/master/sample

On Dec 18, 2013, at 1:06 AM, Nicolas de Bari Embriz Garcia Rojas 
<nbari@inbox.im> wrote:

> Hi, maybe using something like:
> 
>  with Image(filename=src_image) as image: 
>        image.exif_rotate()
> 
> Where exif_rotate automatically based on the image.orientation ir any,
> applies the rotation, currently I have been testing with this:
> 
> https://github.com/nbari/my-sandbox/tree/master/python/wand/exif
> 
> I have some examples that maybe could help.
> 
> regards.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 12/17/2013 15:51, Hong Minhee wrote:
>> Hi Nicolas,
>> 
>> Wand currently doesn’t provide any such function that automatically 
rotates the image based on its EXIF orientation metadata, but it seems 
possible to be implemented in the future.  How could be the interface?  It
would work in that way when rotate() doesn’t take any arguments.  Any 
ideas?
>> 
>> 
>> Thanks,
>> Minhee
>> 
>> On Dec 17, 2013, at 7:19 PM, Nicolas de Bari Embriz Garcia Rojas 
<nbari@inbox.im> wrote:
>> 
>>> I can read the exif but based on the orientation if any, to rotate the
image based on the number.
>>> 
>>> right now I am using this code: 
>>> 
>>> 
https://github.com/nbari/my-sandbox/blob/master/python/wand/exif/apply_orientation.py
>>> 
>>> But wondering if there is something internal that can simple just 
rotate the image based on the exif, maybe something like
>>> 
>>> img.rotate(exif:orientation)
>>> 
>>> 
>>> regards.
>>> 
>>> On Dec 16, 2013, at 11:59 PM, Timur Tabi <timur@tabi.org> wrote:
>>> 
>>>> Nicolas de Bari Embriz Garcia Rojas wrote:
>>>>> 
>>>>> So for example if I get a 1 how to check / re-orientante the image to be
>>>>> in orientation 1.
>>>> Are you asking how to READ the exif information from the image?  Or are 
>>>> you asking how to use that number to determine how to rotate it?
>