Modify orientation of panorama picture (panorama wrong showed on Google Photos)

Started by Andry, May 05, 2018, 05:14:18 AM

Previous topic - Next topic

Andry

Hello! Congratulations to the developer of this great tool!

I'm a newbie with this kind of thing and so sorry if I'm writing something stupid. I also did a quick research on this forum but I didn't found any similar question.

So, with my previous phone (an Asus ZenFone 2) I made several panoramas and sphere photos.  I always used the Asus Gallery to see them and everything was fine. Now, I saw that on Google Photo several of these pictures are displayed correctly only if I do not click on the panorama view. If I try to see them as panorama (the icon with the circular arrow) they are wrong showed. My suspect is that the problem was born because some of these photos where made in portrait mode.

My idea is that I have to edit some metadata values but I really have not idea which and how. Can you help me, please?  :) I installed the GUI version because I'm not so good with code things, so if you can, please help me giving explanations with the GUI commands. Thanks!

I can show you some examples. The picture named "Test" has problems, the picture "TestOK" works correctly. I have to add a drive link because the attachements don't work for these two files. https://drive.google.com/open?id=16HENboqvDu3eafIWjzBVtTGNZqNRfhbM

Phil Harvey

Here are the differences in the metadata between these files with the command

exiftool -a -G1 FILE

< [System]        File Name                       : Test.jpg
---
> [System]        File Name                       : TestOk.jpg
4,5c4,5
< [System]        File Size                       : 3.5 MB
< [System]        File Modification Date/Time     : 2018:05:04 16:05:52-04:00
---
> [System]        File Size                       : 417 kB
> [System]        File Modification Date/Time     : 2018:05:04 15:28:44-04:00
22,23c22,23
< [File]          Image Width                     : 1712
< [File]          Image Height                    : 8912
---
> [File]          Image Width                     : 1692
> [File]          Image Height                    : 820
32c32
< [IFD0]          Modify Date                     : 2017:07:29 17:03:00
---
> [IFD0]          Modify Date                     : 2017:07:30 11:36:37
34c34
< [IFD0]          Image Width                     : 1712
---
> [IFD0]          Image Width                     : 1692
37,38c37,38
< [IFD0]          Image Height                    : 8912
< [IFD0]          Orientation                     : Rotate 90 CW
---
> [IFD0]          Image Height                    : 820
> [IFD0]          Orientation                     : Horizontal (normal)
43c43
< [ExifIFD]       Create Date                     : 2017:07:29 17:03:00
---
> [ExifIFD]       Create Date                     : 2017:07:30 11:36:38
51c51
< [ExifIFD]       Maker Note Unknown Text         : (Binary data 65 bytes, use -b option to extract)
---
> [ExifIFD]       Maker Note Unknown Text         : (Binary data 67 bytes, use -b option to extract)
59,70c59,66
< [XMP-GPano]     Pose Heading Degrees            : 350.0
< [XMP-GPano]     Initial View Heading Degrees    : 90
< [XMP-GPano]     Initial View Pitch Degrees      : 0
< [XMP-GPano]     Initial View Roll Degrees       : 0
< [XMP-GPano]     Initial Horizontal FOV Degrees  : 0.0
< [XMP-GPano]     Cropped Area Left Pixels        : 8056
< [XMP-GPano]     Cropped Area Top Pixels         : 0
< [XMP-GPano]     Cropped Area Image Width Pixels : 1712
< [XMP-GPano]     Cropped Area Image Height Pixels: 8912
< [XMP-GPano]     Full Pano Width Pixels          : 17824
< [XMP-GPano]     Full Pano Height Pixels         : 8912
< [Composite]     Base Name                       : Test
---
> [XMP-GPano]     Pose Heading Degrees            : 180.0
> [XMP-GPano]     Cropped Area Left Pixels        : 912
> [XMP-GPano]     Cropped Area Top Pixels         : 469
> [XMP-GPano]     Cropped Area Image Width Pixels : 1692
> [XMP-GPano]     Cropped Area Image Height Pixels: 820
> [XMP-GPano]     Full Pano Width Pixels          : 3516
> [XMP-GPano]     Full Pano Height Pixels         : 1758


I don't know which of these differences could be significant for Google Photo panos.

Oh, wait.  The MakerNotes are different lengths:

% exiftool ~/Desktop/Examples/Test.jpg -makernotes -b
<ZenCircleTag>ZenUI,PixelMasterCamera,PanoramaMode</ZenCircleTag>
% exiftool ~/Desktop/Examples/TestOK.jpg -makernotes -b
<ZenCircleTag>ZenUI,PixelMasterCamera,PanoSphereMode</ZenCircleTag>


The picture that works is PanoSphereMode, while the other is PanoramaMode.  Could this be the problem?

Try this command to fix Test.jpg to see if it helps:

exiftool -tagsfromfile TestOK.jpg -makernotes Test.jpg

If that doesn't work, you could try copying some of the other tags that are different.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Andry

Thanks for the reply!

I tried with exiftool -tagsfromfile TestOK.jpg -makernotes Test.jpg but nothing changed  :( I can try to change other tags, I already tried before write this thread but without success.

Btw, not only Google Photo has problems to open this file but also others (example the basic Android app Panorama360 viewer). Everything works if you open them has normal picture, not has panorama\sphere, as soon as you try with a pano viewer or something it's broken.
I noted that on the not working picture there are different parameters like:

Orientation  Rotate 90 CW <- Horizontal (normal) in the working picture
Pose Heading Degrees   350.0 <- 180.0 in the working picture
Initial View Heading Degrees    : 90  <- Tag not available in the working picture
Initial View Pitch Degrees      : 0 <- Tag not available in the working picture
Initial View Roll Degrees       : 0 <- Tag not available in the working picture
Initial Horizontal FOV Degrees  : 0.0 <- Tag not available in the working picture

And the follow but these could be different because clearly it's a different picture, no idea.
Cropped Area Left Pixels        : 8056
Cropped Area Top Pixels         : 0 <-
Cropped Area Image Width Pixels : 1712
Cropped Area Image Height Pixels: 8912
Full Pano Width Pixels          : 17824
Full Pano Height Pixels         : 8912

Alan Clifford

The test photo already has a height greater than the width so is a portrait mode photo.  Just guessing but maybe some software is ignoring the orientation tag to rotate it by 90°?

You could try rotating it and taking out the orientation tag.

Later ...

I rotated it but couldn't attach it to this message so it is here http://clifford.ac/~alan/Testcopy.jpg


You could copy that and try it to test my theory!


Andry

Hello!

Thanks for the attempt but your picture is not see as panoramic\spheric on Google Foto: there is not the option to view it as pano\spheric (the circular arrow)

Phil Harvey

This is really more of a Google Photo question if they have a forum for that.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Andry

I already opened a group message in their assistance. I will try to open the picture of Alan Clifford with other viewer to check if only Google Photo has the issue. I'll let you know tomorrow or asap, thanks again guys. I really appreciate your nice help.

Edit: ok with Panorama360 viewer it works! Can you please explain me what you did exactly Alan Clifford? I have to repeat that with more pictures. Thanks!

Alan Clifford

First of all I removed the orientation.  But before that, it's best to check if there are more than one orientation tag
exiftool -a -G filename

Remove the orientation with
exiftool -orientation= filename

I was a bit lazy with the next bit because I used one of my scripts but the essential bit in my script to rotate the image is
jpegtran -progressive  -rotate 90 -trim -copy all  filename > newfilename

I'm afraid I know nothing about the spheric stuff.