Bug 65863 - Image Auto Rotates when inserted
Summary: Image Auto Rotates when inserted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-17 14:04 UTC by J.D.
Modified: 2013-06-26 13:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J.D. 2013-06-17 14:04:21 UTC
I am writing an article for my club newsletter. I tried adding an image that is taller than wide. When it imports (jpeg file) the program rotates the image 90* to the right, so my image is laying on its side. And I can't find a way to rotate the image back again. I've tried deleting the image and reimporting it but it still gets rotated.
Comment 1 J.D. 2013-06-17 14:12:35 UTC
Turns out it must have something to do with the picture resolution or datasize. When I tried to upload the image, the bugzilla server couldn't handle the 5.59mb file, so I shrunk it to exactly 1/2 resolution. Before i uploaded the file I tried again, and this time it imported into the writer document correctly.

I guess this isn't as critical as I thought now.
Comment 2 Thomas Hackert 2013-06-20 15:29:33 UTC
Hello J.D., *,
does your comment #1 mean, your bug was not a bug? Or am I wrong here?
If it was not a bug, it would be nice, if you could close it ... ;)
TIA
Thomas.
Comment 3 Jorendc 2013-06-22 09:01:16 UTC
Per comment 2
Comment 4 J.D. 2013-06-22 16:43:29 UTC
I would still have to classify this as abug, but of just lower importance.

When a LARGE image file is imported as a picture, which is taller than wide, LOWriter rotates teh image 90*.

At first I thought this was a bug for ALL images of that aspect ratio, until I tried shrinking one of them to a smaller physical resolution. Once shrunk, the image imported without a problem. 

That said, the image did appear to be of a lower quality than the ones which used their full native resolution (jpgs produced by a Canon Rebel XSi DSLR)

A related bug, which I don't know if I need to create a new bug report for or if I can piggyback on this one since it also deals with the same pictures: When a writer document gets in excess of a certain size, the program is unable to read the images embedded in the document. Should I open a new bug for this or not?
Comment 5 Tomaz Vajngerl 2013-06-23 10:36:27 UTC
Hi,

Actually, LO doesn't rotate your picture, it is the other way around - other programs rotate the picture according to the exif meta-data in the picture. 

The trick is that when you take a picture with a camera and you hold the camera vertically, the camera will detect this orientation but won't rotate the image however it will mark in the exif meta-data of a picture what was the orientation of the camera when a picture has been taken. Most programs automatically detect the picture orientation and rotate the image automatically or they ask to rotate the picture for you. LO does not detect this - at least not in 4.0. In 4.1 it also detects this and ask if it should rotate the picture for you or not.

When you have shrunken the picture, the orientation has been reset and the picture has been saved correctly rotated, this is why you had no more problems afterwards.

If you still have the original picture then please check in LO 4.1 if it works and asks to rotate the picture (in Writer).

Regards, Tomaž
Comment 6 Thomas Hackert 2013-06-23 14:47:00 UTC
Hello J.D., *,
(In reply to comment #4)
> I would still have to classify this as abug, but of just lower importance.

OK. I will switch it to normal then ... ;)

> When a LARGE image

How did you define "large"? As in a wider and taller picture or with a higher resolution and thus a larger file size?

> file is imported as a picture, which is taller than wide,
> LOWriter rotates teh image 90*.

I haven't one to test ... :( All my pictures, which I insert in Writer don't rotate ... ;)

> At first I thought this was a bug for ALL images of that aspect ratio, until
> I tried shrinking one of them to a smaller physical resolution. Once shrunk,
> the image imported without a problem. 

O.K.

> That said, the image did appear to be of a lower quality than the ones which
> used their full native resolution (jpgs produced by a Canon Rebel XSi DSLR)

Would you be so kind to attach one of these pictures from your camera? Maybe this is really related to the exif information inside, as Tomaz mentioned in his comment 5 ... ;)

> A related bug, which I don't know if I need to create a new bug report for
> or if I can piggyback on this one since it also deals with the same
> pictures:

It is usually not a good idea to combine two or more bugs in one bug report. If it is not reported before, I think it is better to open a new one.

> When a writer document gets in excess of a certain size, the

What does "in excess of a certain size" mean? That it exceed a certain number of pages? And/or because of too much inserted images/sounds/videos its file size extends a certain MB value?

> program is unable to read the images embedded in the document. Should I open
> a new bug for this or not?

Have you tried to change the values under "Tools - Options - LibreOffice - Memory" (especially the options below "Graphics cache")? Does it change anything, if you increment the values there? So, maybe not a bug, but a too restricted memory ... ;)

And as Tomaz in his comment 5, I would recommend it in a newer version than 4.0.0.3 again ... ;)
Sorry for the inconvenience
Thomas.
Comment 7 J.D. 2013-06-23 19:54:05 UTC
(In reply to comment #6)
> Hello J.D., *,
> (In reply to comment #4)
> > I would still have to classify this as abug, but of just lower importance.
> 
> OK. I will switch it to normal then ... ;)

Thank you. I have never reported a bug before.. in any software, I'm sorry I didn't realize how complicated this process is.
> 
> > When a LARGE image
> 
> How did you define "large"? As in a wider and taller picture or with a
> higher resolution and thus a larger file size?

I defined it as an image of a size, either dimension OR filesize that was large enough to cause the problem. I can't say since I don't know what the cause of the problem is. The pictures in question are the unedited images from my DSLR. 
2848px by 4272px, generating a filesize of 4-7megs.
> 
> > file is imported as a picture, which is taller than wide,
> > LOWriter rotates teh image 90*.
> 
> I haven't one to test ... :( All my pictures, which I insert in Writer don't
> rotate ... ;)
> 
> > At first I thought this was a bug for ALL images of that aspect ratio, until
> > I tried shrinking one of them to a smaller physical resolution. Once shrunk,
> > the image imported without a problem. 
> 
> O.K.
> 
> > That said, the image did appear to be of a lower quality than the ones which
> > used their full native resolution (jpgs produced by a Canon Rebel XSi DSLR)
> 
> Would you be so kind to attach one of these pictures from your camera? Maybe
> this is really related to the exif information inside, as Tomaz mentioned in
> his comment 5 ... ;)

This actually makes sense, I'm betting this is THE answer. As for attaching an image, I will have to upload to google and link it from there since its too big for the attachment system here.

> 
> > A related bug, which I don't know if I need to create a new bug report for
> > or if I can piggyback on this one since it also deals with the same
> > pictures:
> 
> It is usually not a good idea to combine two or more bugs in one bug report.
> If it is not reported before, I think it is better to open a new one.
> 
> > When a writer document gets in excess of a certain size, the
> 
> What does "in excess of a certain size" mean? That it exceed a certain
> number of pages? And/or because of too much inserted images/sounds/videos
> its file size extends a certain MB value?
> 
> > program is unable to read the images embedded in the document. Should I open
> > a new bug for this or not?
> 
> Have you tried to change the values under "Tools - Options - LibreOffice -
> Memory" (especially the options below "Graphics cache")? Does it change
> anything, if you increment the values there? So, maybe not a bug, but a too
> restricted memory ... ;)
> 
> And as Tomaz in his comment 5, I would recommend it in a newer version than
> 4.0.0.3 again ... ;)
> Sorry for the inconvenience
> Thomas.

I'm downloading the 4.1 pre-release now. I've never used the beta of LO because this is my production machine.
Comment 8 J.D. 2013-06-23 19:57:44 UTC
Here is a link to a taller than wide image on my Google Drive:
https://docs.google.com/file/d/0B0q8pfT0-of-Q0RMS2E1cU00UUk/edit?usp=sharing
Comment 9 Thomas Hackert 2013-06-26 07:12:21 UTC
Hello J.D., *,
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #4)
> > > I would still have to classify this as abug, but of just lower importance.
> > 
> > OK. I will switch it to normal then ... ;)
> 
> Thank you. I have never reported a bug before.. in any software, I'm sorry I
> didn't realize how complicated this process is.

nothing to excuse :) I know, it is difficult to do all things the right way, if you are reporting a bug the first time ... ;)

> > > When a LARGE image
> > 
> > How did you define "large"? As in a wider and taller picture or with a
> > higher resolution and thus a larger file size?
> 
> I defined it as an image of a size, either dimension OR filesize that was
> large enough to cause the problem. I can't say since I don't know what the
> cause of the problem is. The pictures in question are the unedited images
> from my DSLR. 
> 2848px by 4272px, generating a filesize of 4-7megs.

O.K.

<snip>
> > > That said, the image did appear to be of a lower quality than the ones which
> > > used their full native resolution (jpgs produced by a Canon Rebel XSi DSLR)
> > 
> > Would you be so kind to attach one of these pictures from your camera? Maybe
> > this is really related to the exif information inside, as Tomaz mentioned in
> > his comment 5 ... ;)
> 
> This actually makes sense, I'm betting this is THE answer. As for attaching
> an image, I will have to upload to google and link it from there since its
> too big for the attachment system here.

O.K.

<snip>
> > > When a writer document gets in excess of a certain size, the
> > 
> > What does "in excess of a certain size" mean? That it exceed a certain
> > number of pages? And/or because of too much inserted images/sounds/videos
> > its file size extends a certain MB value?
> > 
> > > program is unable to read the images embedded in the document. Should I open
> > > a new bug for this or not?
> > 
> > Have you tried to change the values under "Tools - Options - LibreOffice -
> > Memory" (especially the options below "Graphics cache")? Does it change
> > anything, if you increment the values there? So, maybe not a bug, but a too
> > restricted memory ... ;)
> > 
> > And as Tomaz in his comment 5, I would recommend it in a newer version than
> > 4.0.0.3 again ... ;)
> 
> I'm downloading the 4.1 pre-release now. I've never used the beta of LO
> because this is my production machine.

You could install it in parallel to the stable version (https://wiki.documentfoundation.org/Installing_in_parallel has an easy to follow instruction IMHO) and then test it in parallel ... ;)

And now back to your bug: If I download your picture from comment 8 and insert it in a new Writer document w/ LO Version: 4.1.0.1 Build ID: 1b3956717a60d6ac35b133d7b0a0f5eb55e9155 with installed Germanophone lang- as well as helppack, LO shows a dialog
<quote>
This image is rotated. Would you like to rotate it into standard orientation?
</quote>
, where I can choose to rotate it or not. Did you get this dialog as well with 4.0.0.3? And I open it in geeqie, I see an entry "Orientation | left, bottom", but I am no expert at this and may have misinterpreted and/or missed some relevant EXIF information there ... :(
HTH
Thomas.
Comment 10 Tomaz Vajngerl 2013-06-26 13:33:46 UTC
As I already said - the camera orientation is defined in Exif of the picture and I have confirmed that this picture has orientation set. LO 4.0 does not rotate the picture according to the orientation meta-data but LO 4.1 does detect orientation and asks if it should rotate the picture.