Bug 95647 - Cropping of TIFFs in Draw/Impress are being scaled
Summary: Cropping of TIFFs in Draw/Impress are being scaled
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: filter:TIFF
Keywords:
Depends on:
Blocks: Image-Crop Images-TIFF
  Show dependency treegraph
 
Reported: 2015-11-07 01:21 UTC by Larry
Modified: 2023-01-10 02:14 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of the bug. page 1 = before cropping, page 2 = after cropping (3.20 MB, application/vnd.oasis.opendocument.graphics)
2015-11-07 01:21 UTC, Larry
Details
TIFF bitmap rescales during a crop action (48.14 KB, image/png)
2015-11-08 19:57 UTC, V Stuart Foote
Details
cropping TIFFs in Writer -- seems OK (4.82 MB, application/vnd.oasis.opendocument.text)
2015-11-08 20:22 UTC, V Stuart Foote
Details
Screenshot in LO 7.6 (215.47 KB, image/png)
2023-01-10 02:14 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larry 2015-11-07 01:21:29 UTC
Created attachment 120336 [details]
Example of the bug.  page 1 = before cropping, page 2 = after cropping

Found in Impress and Draw, at least.

When I insert an image (TIFF in my case) and then crop it, I find that the image gets compressed in the direction that I cropped.  So if I take off the bottom, the image will get slightly compressed upwards.  This skews the aspect ratio of the image and basically makes it impossible for me to line up specific features of different images.  I end up having to cut off the excess image in a different program before bringing the image into LibreOffice.

Attachment included, with "before" and "after" pages.
Comment 1 V Stuart Foote 2015-11-07 04:51:57 UTC
Before cropping you've not set "Keep ratio" on the Position and Size dialog.

Do that and no issues with the Crop.
Comment 2 V Stuart Foote 2015-11-08 19:57:17 UTC
Created attachment 120389 [details]
TIFF bitmap rescales during a crop action

Whoops, too quick to close this out. Sorry...

There is an issue--at least y-axis of the tiff image rendering on Writer canvas is being scaled smaller as the clip result is being calculated.

Scaling is evident when performing clip, during selection--before applying. See the attached clip which show the TIFF rendered to bitmap on Writer canvas being scaled during a clip operation. That changed and incorrect scaling carries into the resulting clip.

The scaling issue during clipping does not affect PNG or JPEG copies of the same images--just the TIFF version.

And, setting or not-setting the "Position & Size" ->  "Keep ratio" has no effect on size distortion of the resulting clipped TIFF.
Comment 3 V Stuart Foote 2015-11-08 20:22:37 UTC
Created attachment 120390 [details]
cropping TIFFs in Writer -- seems OK

Of course that was not with Writer, rather Draw/Impress canvas. 

However, the crop of TIFFs looks to be handled correctly for the recently implemented image crop in Writer.
Comment 4 V Stuart Foote 2015-11-10 00:37:42 UTC
@Philippe,

Croping by handles for Tiff works in Writer, but is somehow scaling the image perceptibly in Draw/Impress as in attachment.
Comment 5 QA Administrators 2017-01-03 19:35:18 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-06-28 03:48:31 UTC Comment hidden (obsolete)
Comment 7 Julien Nabet 2022-06-11 19:29:17 UTC
On pc Debian x86-64 with LO Debian package 7.3.4.2, I could reproduce this.
But I don't reproduce this with master sources updated today.
It may be explained by changes on tiff (above all the use of libtiff for tiff import) on the last 2 months.
Could someone confirm with a daily master build?
Comment 8 QA Administrators 2022-12-09 03:24:10 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2023-01-09 03:21:16 UTC Comment hidden (obsolete)
Comment 10 Aron Budea 2023-01-10 02:14:18 UTC
Created attachment 184550 [details]
Screenshot in LO 7.6

I can still reproduce it in LO 7.6.0.0.alpha0+ (d993327eab0a2c9c8820c6528075b01de68b0ec6) / Ubuntu.