Created attachment 81163 [details] Document with included image 1000x667px, rotated clockwise and then saved Problem description: Steps to reproduce: 1. open writer 2. insert image with width not exactly a multiple of 16 (eg 1000px) 3. rotate the image clockwise with Rightklick->rotate 90° 4. save document, close document and reopen it Current behavior: from the image a stripe wide (width % 16) is cropped from the left side and appears on the right of the rotated image. Expected behavior: the image should be untouched and only rotated Operating System: Windows XP Version: 4.1.0.0.beta1
Couldn't reproduce. If other have this bug - reopen please.
Hi, Can you provide the original picture you used in the document? Thanks, Tomaž
(In reply to comment #2) > Hi, > > Can you provide the original picture you used in the document? > > Thanks, > Tomaž I used you attached document.
Created attachment 81363 [details] additional testcase for Bug 66006 Testcase added. Pictures: used for Testing: green.jpg (1000x667px) green2.jpg (667x1000px) green3.jpg (992x656px) Other extreme-variants to show, that only JPEG is affected: square.(jpg|png|bmp|tif) To test use the old 4-point-list or: - open "test1-unrotated-and-saved.odt" - rotate the image 90°-right (Original is green.jpg) - save the document - even NOW: when rotating image back 90°-left, the image is damaged because a 11-pixel-bottom-block is moved to the top of the image. This applies too for the image saved in the altered document. --- the "square"-images show, that only rotating an inserted JPEG with dimensions not in 8/16px-Raster has the problem. And (maybe another bug) a TIFF can only be rotated clockwise and this has no effect. Hope it helps...
(In reply to comment #4) > Created attachment 81363 [details] > additional testcase for Bug 66006 > > Testcase added. > > Pictures: used for Testing: > green.jpg (1000x667px) > green2.jpg (667x1000px) > green3.jpg (992x656px) > > Other extreme-variants to show, that only JPEG is affected: > square.(jpg|png|bmp|tif) > > To test use the old 4-point-list or: > > - open "test1-unrotated-and-saved.odt" > - rotate the image 90°-right (Original is green.jpg) > - save the document > - even NOW: when rotating image back 90°-left, the image is damaged because > a 11-pixel-bottom-block is moved to the top of the image. This applies too > for the image saved in the altered document. > > --- > > the "square"-images show, that only rotating an inserted JPEG with > dimensions not in 8/16px-Raster has the problem. And (maybe another bug) a > TIFF can only be rotated clockwise and this has no effect. > > Hope it helps... Yes! This testcase good. I can confirm this bug.
Bug stays in 4.1.0.2 RC I suggest to disable image rotating before release because users can irreversibly damage a document by rotating a JPEG even if loading a document later and editing/formatting the images. And this damage can first be seen when document has been saved and it is too late to undo the rotation. Because this feature is a new and long awaited many users will use and test it a lot and will complain about the damaged images in their documents.
(In reply to comment #6) > Bug stays in 4.1.0.2 RC > > I suggest to disable image rotating before release because users can > irreversibly damage a document by rotating a JPEG even if loading a document > later and editing/formatting the images. And this damage can first be seen > when document has been saved and it is too late to undo the rotation. > > Because this feature is a new and long awaited many users will use and test > it a lot and will complain about the damaged images in their documents. Hi, I will change jpeg rotation that only the images with width that is multiple of 16 are allowed to be rotated with lossless jpeg rotation. If it is not multiple of 16, then I will rotate the image and compress to png so that the image quality is preserved. Regards, Tomaž
> Hi, > I will change jpeg rotation that only the images with width that is multiple > of 16 are allowed to be rotated with lossless jpeg rotation. If it is not > multiple of 16, then I will rotate the image and compress to png so that > the image quality is preserved. > Regards, Tomaž Bug stayed in 4.1.0.3 RC and even in 4.1.0.4 RC @Tomaž: will your workaround make it into the final?
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=698315531414b223b35d8507fdf2f56dbcf6bc4c fdo#66006 Convert to PNG for JPEG that can't be losslessly rotated 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.
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=2f2b3fff8997f9da14d64053afd19aa971e7829c&h=libreoffice-4-1 fdo#66006 Convert to PNG for JPEG that can't be losslessly rotated It will be available in LibreOffice 4.1.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.