[Upstream] Wishlist: Add rotation of images to writer

Bug #87220 reported by Vassilis Pandis
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
Wishlist
OpenOffice
Unknown
Medium
libreoffice (Ubuntu)
Fix Released
Wishlist
Unassigned
openoffice.org (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: openoffice.org

Currently when a picture is imported, it is impossible to rotate it. This makes the task of importing images/graphs into OpenOffice unneccessarily difficult and complex. Since OpenOffice already has a gazillion of options about images, it's quite amazing that it cannot rotate them.

WORKAROUND: Use WriterRotationTool http://extensions.openoffice.org/en/project/WriterRotationTool .

Revision history for this message
In , Non-migrated (non-migrated) wrote :

IN microsoft publisher there is a feature which makes cropping and rotating of images a breeze. In
OO.o it is very difficult to achieve good results as these features are not included in all the
relevant programs (writer, presenter and paint)and especially the cropping part is very
difficult to do in a convinient manner due to the small preview.
So what would be a nice way to do
this? Well as I said: Publisher does in the following manner (I seem to remember) After having
clicked an image I have the usual rezize arrows popping up when I point at the edges. If I do it with
'ctrl' pressed I get an rotating arrow indicating that I can rotate the image and if I press the
'alt' key I get a scissor indicating that I can crop the image instead of resizing it.
This is in my
opinion one of the most awkward things to do in OO.o, improving this would give me a far faster
program to work with!

Revision history for this message
In , Stefan-baltzer (stefan-baltzer) wrote :

Reassigned to Christian.

Revision history for this message
In , Christian-jansen-7 (christian-jansen-7) wrote :

Reassigned to Bettina.

Revision history for this message
In , Thorwil-i (thorwil-i) wrote :

In Powerpoint there is a Crop icon.
After clicking it the handlers of selected image change and can then
be used to scale the frame of the image instead of scaling the image
itself.

It works, is well known by Powerpoint users and doesn't require one
to memorize modifier keys (allthough being able to use modifier keys
for fast access is nice.)

Anyway, it's very important that any kind of cropping snaps to grid
and guidelines for serious layout work.

Revision history for this message
In , Robin-laing (robin-laing) wrote :

The method in OOo is a real pain. About 30 minutes to get one graphic to fit a
document last week. I would end up cutting to much or to little.

It would be nice if OOo could be configured to open an external graphics program
as an option.

Revision history for this message
In , Madmonk-1 (madmonk-1) wrote :

IMHO this is really important. If I recall correctly, this becomes impossible
when using a placeholder field or a text box. I need to rotate images for some
of my Writer templates.

Revision history for this message
In , Andrew Ziem (ahziem1) wrote :

*** Issue 49184 has been marked as a duplicate of this issue. ***

Revision history for this message
In , Andrew Ziem (ahziem1) wrote :

*** Issue 38076 has been marked as a duplicate of this issue. ***

Revision history for this message
In , Andrew Ziem (ahziem1) wrote :

*** Issue 70466 has been marked as a duplicate of this issue. ***

38 comments hidden view all 173 comments
Revision history for this message
Chris Burgan (cburgan) wrote :

I'm quite surprised this hasn't come up before. Marking Wishlist and checking upstream.

Changed in openoffice.org:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Chris Burgan (cburgan) wrote :

Linked Upstream to http://www.openoffice.org/issues/show_bug.cgi?id=3545

However there is another report on the upstream tracker that deals with the same thing, both are open so it would be good to keep an eye on both of them:

http://www.openoffice.org/issues/show_bug.cgi?id=12909

Changed in openoffice:
status: Unknown → Confirmed
Chris Cheney (ccheney)
Changed in openoffice.org:
status: Confirmed → Triaged
Chris Cheney (ccheney)
tags: added: hardy
2 comments hidden view all 173 comments
Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

Often I crate documents and insert images from scanner. Images appear some normal and some rotated on 90 degree. For experienced users it is no problem, they have Gimp, but for beginners it is problem. Besides it slows down work when need many images to rotate.

Please, add ability to rotate raster images on 90 degree clockwise an counter-clockwise

Revision history for this message
In , Samuel Mehrbrodt (sam92) wrote :

It's a shame that Writer doesn't support rotating of images (Impress and Draw do).
I hope this will get fixed soon. Any plans on this?
It would be even better to have the image updated live, not only after hitting "OK" and closing the dialog.

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

Created attachment 44774
Sample document

Illustration of the problem and an idea for a workaround or solution

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

Thanks for explanation. It is very interesting.
When I rotated most bottom of image of this example to 25 degree, it begin to jump on screen.
produced on Libreoffice 3.3.2 on Mandriva 64 bit and windows XP 32 bit

Revision history for this message
In , Bernhard Krabina (krabina) wrote :

Created attachment 46148
OpenOffice Toolbox

OpenOffice Toolbox by Thomas Krumbein

Revision history for this message
In , Bernhard Krabina (krabina) wrote :

Created attachment 46149
Documentation and License of the Toolbox (in German)

Revision history for this message
In , Bernhard Krabina (krabina) wrote :

The OpenOffice Toolbox by Thomas Krumbein can do it. It is a set of very useful macros. It works in LibO, but in my test the place of the image changed.

Maybe this functionality (among other functions such as cropping images) should be incorporated in LibO?

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

May be you want to vote on our new Voting Page?
<http://wiki.documentfoundation.org/Vote_for_Enhancement>

Changed in openoffice.org (Ubuntu):
status: Triaged → Won't Fix
8 comments hidden view all 173 comments
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote : migrating packaging from OpenOffice.org to Libreoffice

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

Revision history for this message
Michael Nagel (nailor) wrote : Re: [Upstream] [hardy] Wishlist: Add rotation of images to writer

I checked using LibreOffice 3.2.2.2 on a Mac and this bug is present in LibreOffice as well.

Changed in df-libreoffice:
importance: Unknown → Wishlist
status: Unknown → Confirmed
penalvch (penalvch)
summary: - [Upstream] [hardy] Wishlist: Add rotation of images to writer
+ [Upstream] Wishlist: Add rotation of images to writer
8 comments hidden view all 173 comments
Revision history for this message
In , Dmitry-Kogura (dmitry-kogura) wrote :

This is basic functional. Must have. Unpleasantly surprised.

Revision history for this message
In , jmeidal (jmeidal) wrote :

Would also love to see this, as in Draw's ability to rotate shapes and photos.

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html

Changed in df-libreoffice:
status: Confirmed → Incomplete
Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

remains in LibO 3.5.0 beta 1

Changed in df-libreoffice:
status: Incomplete → Confirmed
Revision history for this message
In , Vitriol-vitriol (vitriol-vitriol) wrote :

*** Bug 46164 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Philippe21-clement (philippe21-clement) wrote :

Hello, there is the extension WriterRotateTool contouner for this bug.
Is it possible for hackers to integrate the extension WriterRotationTool as default extension in Writer?
With many thanks, Philippe

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

Also affected by this in LO 3.5.1
It is really surprising it hasn't been implemented yet.

Revision history for this message
In , Jbf-faure-9 (jbf-faure-9) wrote :

(In reply to comment #1)
> It's a shame that Writer doesn't support rotating of images (Impress and Draw
> do).

No. From my point of view it a shame to duplicate functionalities between modules. You can do everything you may want on your images in Draw (or Gimp if you prefer). No need to modify them in Writer. Writer is a text processor, not a drawing software. Please, keep it as light as possible.

Best regards. JBF

Revision history for this message
In , GT (gleppert) wrote :

@Jean-Baptiste: Like cropping and resizing also rotating of images is IMHO an absolute core functionality of a word processor.

However, in terms of duplication, you are absolutely right. If possible, Writer should use the same code base for rotating images like Draw and Impress do. Wasn't this the goal of the new Drawing Layer?

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

> Writer is a text processor, not a drawing software.
You are right. But many people think that paint program is msWord. And now we have many doc and docx files with rotated images. And expect that they will open correctly.

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

(In reply to comment #15)
> (In reply to comment #1)
> > It's a shame that Writer doesn't support rotating of images (Impress and Draw
> > do).
>
> No. From my point of view it a shame to duplicate functionalities between
> modules. You can do everything you may want on your images in Draw (or Gimp if
> you prefer). No need to modify them in Writer. Writer is a text processor, not
> a drawing software. Please, keep it as light as possible.
>
> Best regards. JBF

Actually, rotating an image is an extremely basic task and should be available in writer. Of course everybody expects to see that implemented when all the following image enhancement options are already available in Writer:
- Invert
- Smooth
- Sharpen
- Remove noise
- Solarisation
- Ageing
- Posterise
- Pop art
- Charcoal sketch
- Relief
- Mosaic
- Greyscale
- Black and white
- Watermark
- Change colours, brightness, contrast, gamma
- Transparency
- Flip horizontally or vertically

And no rotating ?? How can you justify that? I understand if you argue about the necessity to have options like "pop art" or "charcoal sketch" available in writer, but a functionality as basic as rotating is a must have.

Just to give an example: today, I was having a look at my new photos, and rotating them with the F-spot viewer. When I added one of those photos to a document in Writer later on, the image wasn't rotated. As an average user, I don't know why Writer didn't take into account the modifications I already made, and I probably don't want to look into it. The only thing I want is an easy way to rotate it directly in Writer, without having to use another specialised software for such a simple task, interfering with my workflow.

Regards.

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

May be for now we should add some hints to the manuals that DRAW offers some extended image editing features?

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

It is very good idea

Revision history for this message
In , Bartosz Kosiorek (gang65) wrote :
Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

Thanks for link to extension
Currently it not installs in 3.5.1, writes that version greater than 3.3 not supported. May be manual editing of extension needed.

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

I confirm that the OpenOffice extension isn't compatible with LO 3.5.2 either.
Also, there is no equivalent extension in the LO Extensions website.

Are there any plans to implement this in 3.6? I really hope so.

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

Please, do not change Version field in future.
PS: We can draw rectangle in Writer and set picture as texture. Then rotate rectangle. But picture not rotates with rectangle. In all modules of office.

Revision history for this message
In , Cno (cno) wrote :

(In reply to comment #23)
> I confirm that the OpenOffice extension isn't compatible with LO 3.5.2 either.

Any idea why, or could you try to find out via mail list or forum?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
Changed in libreoffice (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Won't Fix
Changed in openoffice:
importance: Unknown → Medium
status: Confirmed → Unknown
102 comments hidden view all 173 comments
Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

Is it correct that a "sane" implementation of rotating images in Writer depends on the complex rewrite of the drawing layer?

If this is the case, over at Apache OpenOffice, Armin Le Grand is working on it in child workspace AW080: http://wiki.openoffice.org/wiki/Aw080_documentation

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

Changed the importance to "high" as this is still unresolved in 3.6.4.3 and it is still the top issue in "Vote for enhancement" (https://wiki.documentfoundation.org/Vote_for_Enhancement#Bug_34423_-_Rotate_Images_in_Writer)

This is a real problem in places where users want to perform tasks as simple as creating a sign or a pdf document with images. In most businesses this would be seen as a serious flaw.

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

It is amazing to see that this issue was reported on the OpenOffice bug tracker in... March 2002. Yes, this has been an issue for more than 10 years.
Here is the bug report:
https://issues.apache.org/ooo/show_bug.cgi?id=3545

As it was stated before, ericb2 at Apache is apparently working on it for AOO 4.0 (expected in April 2013), as you can see at the bottom of this page:
https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+4.0+Release+Planning

I could not find any extension implementing this for LO.

Revision history for this message
In , Stéphane Guillou (stephane-guillou) wrote :

Actually, I found the extension "WriterRotationTool".
It works as a workaround in LO. You will need to install the version 1.0 (tested on LO 3.6.4.3) from there:
http://extensions.services.openoffice.org/en/node/3620/releases

After restarting LO, you should see a new blue icon in the toolbar. By selecting a picture and clicking this icon, you can now rotate the object as it is considered as a graphic.

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

We do not need to integrate a function for what an excellent Extension does exist. Or do you breed herrings in your bathtub because the only other way to get herrings is in a store?

So WONTFIX for now.

But we should invite WriterRotationTool Author Thibault Vataire to publish his Extension also on LibO Extensions Repository.

Changed in df-libreoffice:
status: Confirmed → Won't Fix
Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

Dear Rainer, please reconsider your decision to mark this bug as WONTFIX. In my humble opinion, this is not acceptable given the history and given the demand for this feature.

The existence of an extension for a fundamental feature of a word processor (that's how it is perceived on the users' side) does not justify to close this bug. Would you close a bug entry as wontfix, if it was a bug that does not allow to type the character "z" and there was an extension enabling the user to type the character "z"? There is a real reason why this bug is ranked so high on the votes for enhancement wiki. The same bug has 12 CC in this bug report, 15 votes on the ODF-wiki and 211 votes in the Apache OpenOffice tracker!

*My suggestion*: Armin and others extensively pointed it out that this bug is a result of a major drawing layer design issue. It is not a easy hack, but a hard hack. Please mark it as such and please help Armin LeGrand to get the Drawing Layer Aw080 done as fast as possible: http://wiki.openoffice.org/wiki/Aw080_documentation
*In my opinion, this is a very difficult task where the guys at Apache OpenOffice need the help and collaboration of the guys at LibreOffice!*

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

@Gerry:
It's not my decision, I simply wrote down a fact. It's too improbable that a developer finds time and enthusiasm to do the chin ups for a lot of work (with the current DRAW design) only because some people would prefer to do writer picture rotating by LibO functions instead of Extension functions.

Something completely different is that it definitively will be useful to improve the DRAW design, I hope for progress there, also because of many other issues. I would really like to know how the LibO future plans for collaboration are, I will ask ESC.

Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

Dear Rainer, thank you very much for your quick response. I fully understand that currently there is no developer taking care of this. Still, I think it is a valid request and therefore it should be not a RESOLVED-WONTFIX bug. The information that TDF and the LibreOffice developers don't prioritize it should be sufficient.

Please set it to REOPENED, because WONTFIX also means that no standard search in the bug tracker finds this request, that someone will again open a new bug entry on this matter anyway, and that it is kind of an insult to all the people requesting this enhancement.

I love your idea to talk to ESC with regards to the Aw080 work by Armin at Apache. It is a major rewrite (> 2 years of work) which LO will benefit a lot. In the last paragraph of Armin's wiki entry, he asks for bug fixes and that it must be "tested carefully before aw080 can be reintegrated". Cooperation on this also means that Aw080 could directly be integrated in LO if ready.

Revision history for this message
In , Khagaroth (khagaroth) wrote :

This is low priority and an enhancement, there is no real reason to wontfix this, it can happily sit here another ten years before someone finally fix it or before the AOO drawing layer rewrite is backported to LO, reopened.

Changed in df-libreoffice:
status: Won't Fix → Confirmed
penalvch (penalvch)
description: updated
Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

Hi everyone. I need this bug/feature so much that I'm willing to pay 30.00 bucks for it.
This offer is registered at FreedomSponsors.org (http://www.freedomsponsors.org/core/issue/229/functionality-request-rotate-images-in-writer).
Once you solve it (according to the acceptance criteria described there), just create a FreedomSponsors account and mark it as resolved (oh, you'll need a Paypal account too)

I'll then check it out and will gladly pay up!

If anyone else would like to throw in a few bucks to elevate the priority on this issue, you should check out FreedomSponsors!

Thanks

Changed in df-libreoffice:
status: Confirmed → In Progress
Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

@Cao Cuong Ngo: Thanks a lot for taking the assignment for rotating images in writer.

Although I am not a programmer, a few hints which might be helpful:

As far as I understood, a sane implementation of image rotation depends on the drawing layer in Writer. This drawing layer change seems to be not a trivial task, but Armin Le Grand from Apache OpenOffice has been working for a long time on it in child workspace AW080: http://wiki.openoffice.org/wiki/Aw080_documentation

Also, it might make sense to link with the Apache guy who started working on this: Ericb2 "Implement image rotation and some other existing draw features in Writer" Please see https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+4.0+Release+Planning

Revision history for this message
In , Quikee (quikee) wrote :

Hi,

I have actually already a working solution for the most common use case - 90 degree image rotation. The rotation is working on the image itself, so it does not need a drawing layer rewrite (AOO guy are working on this so we don't need to duplicate the effort). For jpeg images I use a lossless rotation which does not degrade the image quality, for PNG and GIF I just simple recompress the rotated image. Vector images are more complicated and I have not found a solution yet - maybe at first I will disable rotation for this types of images.

Additional to this I implemented metadata (Exif) extraction for JPEG - this way I detect the orientation of the image. I have integrated this into the import to automatically rotate the image (if the user wishes so).

I will commit the changes during weekend into master so that others can try it out.

@Cao Cuong Ngo: Can you please explain what kind of solution you had in mind?

Regards, Tomaž

Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

It is nice to see such a sudden move from several people on this important issue which dates far back to 2002 (or even earlier).

@Tomaz: Is it in principle possible to allow any degree of rotation or does it involve serious additional work? I am asking because I often work with scanned objects (e.g. images, graphs, newspaper articles) which often need only minimal rotation to correct for slightly skewed scanning.

Revision history for this message
In , Cao-cuong-ngo (cao-cuong-ngo) wrote :

Hi Tomaz,

I'm interested in fixing this but not started yet. It'd great if you already have solution. We'll of course see if AOO does something too.

Regards,
Cuong.

Revision history for this message
In , Quikee (quikee) wrote :

(In reply to comment #40)
> @Tomaz: Is it in principle possible to allow any degree of rotation or does
> it involve serious additional work? I am asking because I often work with
> scanned objects (e.g. images, graphs, newspaper articles) which often need
> only minimal rotation to correct for slightly skewed scanning.

Unfortunately it is only possible to do 90° rotations this way. The only thing I can make for you is an easier conversion to a draw object but in my opinion the best thing to do in your case is to adjust the angle in an external tool like GIMP for example. To have such an tool built-in is also a good idea - but not so trivial to make.

Regards, Tomaž

Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

(In reply to comment #42)
> Unfortunately it is only possible to do 90° rotations this way. The only
> thing I can make for you is an easier conversion to a draw object but in my
> opinion the best thing to do in your case is to adjust the angle in an
> external tool like GIMP for example. To have such an tool built-in is also a
> good idea - but not so trivial to make.

Dear Tomaž,
thanks a lot for the explanation. Indeed, 90° rotations will be the first step which is enough for most use cases. For the skewed-scans-use-case I will continue to use an external tool (Gimp) to do this. The internal work-around to rotate in Draw and cut&paste to Writer usually leads to low quality graphics, unfortunately.
To understand the difficulty of any-degree-rotations better: Is this then the aforementioned limitation in the drawing layer (which the Aw080 child workspace tries to solve) which makes these transformations difficult or is there a completely different problem?

Revision history for this message
In , Quikee (quikee) wrote :

Hi,

I have commited the rotation code into master - you can test it in the latest daily build [1]. Currently rotation is located in right-click menu on an image, unde "manage graphic" but this may change in the future.

[1] http://dev-builds.libreoffice.org/daily/master/

(In reply to comment #43)
> Dear Tomaž,
> thanks a lot for the explanation. Indeed, 90° rotations will be the first
> step which is enough for most use cases. For the skewed-scans-use-case I
> will continue to use an external tool (Gimp) to do this. The internal
> work-around to rotate in Draw and cut&paste to Writer usually leads to low
> quality graphics, unfortunately.
> To understand the difficulty of any-degree-rotations better: Is this then
> the aforementioned limitation in the drawing layer (which the Aw080 child
> workspace tries to solve) which makes these transformations difficult or is
> there a completely different problem?

AFAIK it is not really the drawing layer that is the problem - rotation is nicely supported in Calc, Impress and Draw. The problem is that Writer is using different code than the others. Someone might hack up Writer with rotation support (which would also not be easy at all) but ideally would be to refactor the code to use the common drawing code all across components. This is something Aw080 tries to solve (among many many other things) and it is not a trivial task to do.

Regards, Tomaž

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

@ Tomaz Vajngerl
Thanks for implementing this functionality

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

I tried this on Win 8 in today's Windows build (
2013-04-23_04.48.50_LibreOfficeDev_4.1.0.0.alpha0_Win_x86.msi ). Basically
the context menu says just: Manage Graphic --> <No selection possible>
Should I give it another day before trying again?
I'll try again on Win 7 when I get back home.

Thanks for implementing, anyway!

On Tue, Apr 23, 2013 at 11:10 AM, <email address hidden> wrote:

> *Comment # 45 <https://bugs.freedesktop.org/show_bug.cgi?id=34423#c45>on bug
> 34423 <https://bugs.freedesktop.org/show_bug.cgi?id=34423> from
> <email address hidden> *
>
> @ Tomaz Vajngerl
> Thanks for implementing this functionality
>
> ------------------------------
> You are receiving this mail because:
>
> - You are on the CC list for the bug.
>
>

Revision history for this message
In , Quikee (quikee) wrote :

(In reply to comment #46)
> I tried this on Win 8 in today's Windows build (
> 2013-04-23_04.48.50_LibreOfficeDev_4.1.0.0.alpha0_Win_x86.msi ). Basically
> the context menu says just: Manage Graphic --> <No selection possible>
> Should I give it another day before trying again?
> I'll try again on Win 7 when I get back home.
>
> Thanks for implementing, anyway!

Hi,

I forgot to mention. Currently only jpg, gif (non animated) and png images are supported. For any other you will see the "Manage Graphic --> <No selection possible>". I wanted to support svg and other vector images but I did not manage to losslessly rotate them yet. If you a jpg, gif or png image that show this behavior then I would like to have this document because it is most likely a bug.

Regards, Tomaž

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

I've now tested
master~2013-04-23_04.48.50_LibreOfficeDev_4.1.0.0.alpha0_Win_x86.msi<http://dev-builds.libreoffice.org/daily/master/Win-x86@6/current/master~2013-04-23_04.48.50_LibreOfficeDev_4.1.0.0.alpha0_Win_x86.msi>
on
my Win 7 here and it works beautifully in the following cases:

1. Imported JPG rotates left/right
2. Imported PNG rotates left/right
3. Imported JPG rotates left/right

Now, when I simply paste in a screenshot, the command for rotating the
images is simply not available "Manage Graphic --> <No selection
possible>".
However, after saving the document and then restarting Writer, it's again
possible to select left/right rotation on the pasted images from the
context menu again.

Thanks for the good work so far.

I suggest button icons for left/right rotation ends up in the "Picture"
toolbar, right next to the flip horizontally / flip vertically button
icons. I think there are some nice icons in the Tango icon set.
Furthermore, in the cases where left/right rotation is not supported due to
the file format, I propose you simply gray out the buttons and put some
kind of tooltip which states something like "Rotation is supported for GIF,
JPG and PNG images".

Thanks again!

On Tue, Apr 23, 2013 at 1:22 PM, <email address hidden> wrote:

> *Comment # 47 <https://bugs.freedesktop.org/show_bug.cgi?id=34423#c47>on bug
> 34423 <https://bugs.freedesktop.org/show_bug.cgi?id=34423> from Tomaz
> Vajngerl <email address hidden> *
>
> (In reply to comment #46 <https://bugs.freedesktop.org/show_bug.cgi?id=34423#c46>)
> > I tried this on Win 8 in today's Windows build (
> > 2013-04-23_04.48.50_LibreOfficeDev_4.1.0.0.alpha0_Win_x86.msi ). Basically
> > the context menu says just: Manage Graphic --> <No selection possible>
> > Should I give it another day before trying again?
> > I'll try again on Win 7 when I get back home.
> >
> > Thanks for implementing, anyway!
>
>
> Hi,
>
> I forgot to mention. Currently only jpg, gif (non animated) and png images are
> supported. For any other you will see the "Manage Graphic --> <No selection
> possible>". I wanted to support svg and other vector images but I did not
> manage to losslessly rotate them yet. If you a jpg, gif or png image that show
> this behavior then I would like to have this document because it is most likely
> a bug.
>
> Regards, Tomaž
>
> ------------------------------
> You are receiving this mail because:
>
> - You are on the CC list for the bug.
>
>

Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

Dear Tomaž, thanks a lot for progamming this enhancement. Looking here [1] and here [2], many people will be thankful for this!

Can we already mark this bug as RESOLVED->FIXED?

Shall we create two follow-up bug entries? Such as:
* Allow rotation of vector graphics (e.g. SVG) in Writer
and
* Allow rotation of images in Writer in any degrees (currently only 90° steps possible)

[1] https://wiki.documentfoundation.org/Vote_for_Enhancement#Bug_34423_-_Rotate_Images_in_Writer
[2] http://www.freedomsponsors.org/core/issue/229/functionality-request-rotate-images-in-writer

Revision history for this message
In , Samuel Mehrbrodt (sam92) wrote :

Maybe before we close this bug, Tomaz, could you make a few small enhancements to be consistent with the UI:

- Add a menu entry in the "Format" menu named "Rotate Picture"
- Add buttons the the "Picture" toolbar.
- Rename the "Manage Graphic" context menu entry to "Rotate Picture"
- If Rotation is not possible, show a hint, even in the menu.

Thanks for your work :) It's been a long-awaited feature.

@Jarl Arntzen: When commenting via email, please remove the former comment from your mail. Thanks.

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

@Tomaž Vajngerl: Thanks for your efforts thus far. I really appreciate it!
I'd like to encourage you to register as a programmer at FreedomSponsors.org to get some payment for your work after adding some or all of Samuel's suggestions (below):
http://www.freedomsponsors.org/core/issue/229/functionality-request-rotate-images-in-writer

@Samuel M.: Absolutely. I'll remove the previous message. Just didn't realize how Gmail handles this in the new layout before now.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4bdbf360360bcc39929a18a4226a6ad1a22d8630

fdo#34423 Add Rotate Left/Right to toolbar and menubar.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

@Tomaž Vajngerl: Fantastic work! The rotate left/right arrows are very easy to find, right next to the flip buttons.

I've tested image rotation in Win 8 using this build.
----------
master~2013-05-13_01.26.32_LibreOfficeDev_4.1.0.0.alpha1_Win_x86.msi
Version: 4.1.0.0.alpha1+
Build ID: c0417e82174297ace604c68fc577c831929f357
----------

Works well:
1. Rotating left/right works very well with all 4 anchor types and wrap types.
2. Setting grayscale/black and white/watermark works well without interference.
3. Tweaking colors works without trouble.
4. Transparency works.

Workarounds needed:
1. Pasting an image requires saving and reloading the .odt-file to enable the buttons and allow any rotation.
2. Using any of the graphic filters also instantly disables the rotate-button and the file needs saving and reloading before the buttons are enabled again.
3. Vertical or horizontal flipping is instantly reset when any of the rotate buttons are pressed. (Minor)

I'll test this more on Linux Mint 14 later...

Thanks again!

Even with these workarounds, I consider the feature complete enough to pay out the reward. Image rotation reward on FreedomSponsors.org has hereby been upped to $40 and paid in full.
See: http://www.freedomsponsors.org/core/issue/229/functionality-request-rotate-images-in-writer if you consider contributing towards further bugfixing and improvements.

Kind Regards,
Jarl Arntzen

Revision history for this message
In , Quikee (quikee) wrote :

(In reply to comment #53)
> 1. Pasting an image requires saving and reloading the .odt-file to enable
> the buttons and allow any rotation.
I can not reproduce this in Linux - it works fine if I copy/paste or drag&drop a Jpeg image. What is the type of image? Can you also check in "Compress Graphic.." dialog (in LO 4.1). I will try this tomorrow in Windows - maybe the problem is windows specific.

> 2. Using any of the graphic filters also instantly disables the
> rotate-button and the file needs saving and reloading before the buttons are
> enabled again.
When you use a graphic filter the image becomes uncompressed - this is however not a format that is currently supported. When you later save the document, the image is compressed to PNG - this is why it works when you reload. I will add uncompressed and some other image formats in the next step.

> 3. Vertical or horizontal flipping is instantly reset when any of the rotate
> buttons are pressed. (Minor)
Hm.. this one is interesting. I have to see what is going on here.

One open item is also:
- If Rotation is not possible, show a hint, even in the menu.

I really do not know how to easily do that. Toolbars, menus are hardcoded - it is really hard to show any additional hints. The only way I can think of right now is to leave buttons and menu items enabled but show a dialog when it is not possible but I think this is lame. If anyone knows of an example where such hint is used in LO, then let me know.

> Thanks again!
>
> Even with these workarounds, I consider the feature complete enough to pay
> out the reward. Image rotation reward on FreedomSponsors.org has hereby been
> upped to $40 and paid in full.
> See:
> http://www.freedomsponsors.org/core/issue/229/functionality-request-rotate-
> images-in-writer if you consider contributing towards further bugfixing and
> improvements.

Oh great, thanks.

> Kind Regards,
> Jarl Arntzen

Regards, Tomaž

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

Created attachment 79287
Test of pasting screenshot on Win8

This image shows the Compress Image dialog after pasting a screenshot in Win8

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

> > 1. Pasting an image requires saving and reloading the .odt-file to enable the
> > buttons and allow any rotation.
> I can not reproduce this in Linux - it works fine if I copy/paste or drag&drop a
> Jpeg image. What is the type of image? Can you also check in "Compress
> Graphic.." dialog (in LO 4.1). I will try this tomorrow in Windows - maybe the problem is windows specific.

See attachment above. Like you say, drag-drop or copy/paste of jpg or png files on disk works very well. I wasn't even aware of this option.
A pasted screenshot, however is reported as file type "Unknown" in the Compress Graphic dialog (see attachment). After saving and reloading the writer file, the pasted screenshot is reported as being PNG and can be rotated.
Now, I do not really think this is a big weakness. In my experience, I can not really think of a good reason for rotating a screenshot at all. Cropping, however, is something that happens all the time in my line of work.

> One open item is also:
> > - If Rotation is not possible, show a hint, even in the menu.
> I really do not know how to easily do that. Toolbars, menus are hardcoded - it
> is really hard to show any additional hints. The only way I can think of right
> now is to leave buttons and menu items enabled but show a dialog when it is not
> possible but I think this is lame. If anyone knows of an example where such
> hint is used in LO, then let me know.

Not to worry. Simply disabling the buttons rotation buttons is more than good enough for a hint.
I was thinking of the case where rotation is not possible until the user takes some additional action, like saving and reloading the document.
And in such a case, disabling the rotation buttons would be the correct feedback along with a tooltip on each disabled button which states something like:
"Please save and reload the document to allow rotating the image."
As stated above, this might only occur when a user pastes a screenshot. Also, this issue will be moot if the "uncompressed" format is supported in the future.

> 2. Using any of the graphic filters also instantly disables the
> rotate-button and the file needs saving and reloading before the buttons are
> enabled again.
"When you use a graphic filter the image becomes uncompressed - this is however not a format that is currently supported. When you later save the document, the image is compressed to PNG - this is why it works when you reload. I
will add uncompressed and some other image formats in the next step."

Sounds good. I've almost never used the filters but adding handling of the uncompressed images will also solve the screenshot pasting issue.

>> 3. Vertical or horizontal flipping is instantly reset when any of the rotate
>> buttons are pressed. (Minor)
>Hm.. this one is interesting. I have to see what is going on here.
I can't remember the last time using any of the flip buttons but, of course, flipping may be very useful to many.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4d2a7692ef7d5cf733cb818b67be300968aa5689

fdo#34423 Allow to rotate raw uncompressed bitmaps.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=01c5c1de3acc9039fabef1fa03d171fa1a75a702&h=libreoffice-4-1

fdo#34423 Allow to rotate raw uncompressed bitmaps.

It will be available in LibreOffice 4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

Revision history for this message
In , Barta-c (barta-c) wrote :

great job Tomaz!!!
this fixes a longstanding OOo issue that was opened in 2002, received more than 200 votes but was never resolved by Sun/Oracle/Apache devs.

https://issues.apache.org/ooo/show_bug.cgi?id=3545

Revision history for this message
In , Jarl Arntzen (jarl-arntzen) wrote :

Hi. I've just tested this out on Win7 now. The rotation works really well!
Be it screenshots pasted directly into the document, images drag-dropped in from the desktop or imported through Insert -> Picture -> From file... Even a linked image can be rotated. Great work.

Some small bugs:
1. Swapped flip directions
Now, I didn't notice at first but on the toolbar both the horizontal and vertical flip buttons has the tooltip "Flip Horizontally" and each one now does the opposite to what the icon might indicate. The left/right-pointing arrow flips the image up/down and vice versa.

2. Missing icon:
Also, on the context menu, the icon is missing for "Rotate 90 left" but is present for the other option.

Other than that, it works beautifully.

Version: 4.2.0.0.alpha0+
Build ID: c36348f20c4fcb6ae1acb0fd06c19edfa9fb108

Thanks!

Revision history for this message
In , Quikee (quikee) wrote :

Hi,

(In reply to comment #60)
> Some small bugs:
> 1. Swapped flip directions
> Now, I didn't notice at first but on the toolbar both the horizontal and
> vertical flip buttons has the tooltip "Flip Horizontally" and each one now
> does the opposite to what the icon might indicate. The left/right-pointing
> arrow flips the image up/down and vice versa.

This is not related to image rotation. Can you file a new bug for this? Thanks.

> 2. Missing icon:
> Also, on the context menu, the icon is missing for "Rotate 90 left" but is
> present for the other option.

OK, this has been fixed.

Regards, Tomaž

Revision history for this message
In , Gerry-treppel (gerry-treppel) wrote :

Hi Tomaž, thanks for your great work on this.

I'd like to ask whether rotation of SVGs is now also supported or whether it is planned for the future? Thanks.

Revision history for this message
In , Quikee (quikee) wrote :

(In reply to comment #62)
> Hi Tomaž, thanks for your great work on this.
>
> I'd like to ask whether rotation of SVGs is now also supported or whether it
> is planned for the future? Thanks.

It is planned but first I have to figure out how to do it. It should in theory be easy to rotate a vector image (svg import -> vector image -> rotate -> svg export) but for some reason this did not work when I tried it.

Revision history for this message
In , Ron Johnson (ron-l-johnson) wrote :

Thanks for this feature. It'll simplify some of my tasks.

Revision history for this message
In , suokunlong (suokunlong) wrote :

I believe image rotation feature is there since LibreOffice 4.1, so maybe this bug report should be marked as RESOLVED FIXED?

Revision history for this message
In , Sasha-libreoffice (sasha-libreoffice) wrote :

Indeed, in initial description of this bug requested rotation only by 90 degree. Therefore feature is fully implemented. Thanks to Tomaz Vajngerl.
But bug is assigned to him. And therefore it is up to him to decide when to close.

Revision history for this message
In , Barta-c (barta-c) wrote :

(In reply to comment #66)
> Feature is fully implemented. Thanks to Tomaz Vajngerl.
> But bug is assigned to him. And therefore it is up to him to decide when to
> close.

are you sure this is the rule?
I thought that any user could mark this a RESOLVED FIXED since we all agree that the new feature works perfectly.

anyway thumbs up for Tomaz!!!

Changed in libreoffice (Ubuntu):
status: Won't Fix → Fix Released
Changed in df-libreoffice:
status: In Progress → Fix Released
Displaying first 40 and last 40 comments. View all 173 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.