Bug 42038 - Cropped images not cropped on export to html
Summary: Cropped images not cropped on export to html
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Crop HTML-Export
  Show dependency treegraph
 
Reported: 2011-10-20 03:10 UTC by Milos Sramek
Modified: 2019-12-04 16:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
attachment (207.56 KB, application/x-zip-compressed)
2011-10-23 10:44 UTC, Milos Sramek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Sramek 2011-10-20 03:10:17 UTC
If a document with cropped images is exported to html, the images are not cropped.

Files 
crop-LO.odt - document with cropped image
crop-LO-export.html - exported by File/Export. The image is not cropped, displayed in full size
crop-LO.html - saved by File/Save As. The image is not cropped, its size is adjusted to the correct size of the cropped image

In fact, I miss the possibility to delete the cropped areas of the cropped images. It would be great to add such option to the image crop dialog.
Comment 1 tester8 2011-10-20 12:28:10 UTC
Can't see any attaches files. Please, reattach.
Comment 2 Milos Sramek 2011-10-21 01:52:58 UTC
For some unknown reason I am not able to upload the file. I get "The file you are trying to attach is empty, does not exist, or you don't have permission to read it".

The file exists, is not empty and I have permissions to read it. 
It is a zip archive - can this be the problem?
Milos
Comment 3 Milos Sramek 2011-10-21 01:56:06 UTC
For some unknown reason I cannot upload the file. I get "The file you are trying to attach is empty, does not exist, or you don't have permission to read it."

I've checked the file, it is OK.
Comment 4 Milos Sramek 2011-10-23 10:44:28 UTC
Created attachment 52652 [details]
attachment

Another attempt to attach the file. Will it go through? Or, am I doing something wrong?
Comment 5 tester8 2011-10-29 06:53:36 UTC
(In reply to comment #4)

> Another attempt to attach the file. Will it go through?
Yes.

Reproduced with

LO 3.4.3 OOO340m1 (Build:302)
Ubuntu 10.04.3 x86
Linux 2.6.32-34-generic Russian UI

Milos Sramek's files behavior is same is described.
In my test in both "Export" and "Save as" the image is not cropped, its size is
adjusted to the correct size of the cropped image.
Comment 6 tester8 2011-12-29 14:57:18 UTC
LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI

"Export" and "Save as" the image is not cropped, its size is
adjusted to the correct size of the cropped image.
Comment 7 A (Andy) 2013-05-01 08:24:14 UTC
reproducible with LO 4.0.2.2 (Win7 Home, 64bit)
Comment 8 QA Administrators 2015-03-04 02:19:42 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2015-03-22 12:52:46 UTC
I get same result with export & save as: The image is not cropped, its size is adjusted to the correct size of the cropped image.

Win 7 Pro 64-bit, LibO Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI
Comment 10 Gülşah Köse 2016-03-03 13:09:48 UTC
I think it's an important problem. I want to work on it. Is there anybody to give some code pointer?
Comment 11 Buovjaga 2016-03-03 13:18:00 UTC
(In reply to Gülşah Köse from comment #10)
> I think it's an important problem. I want to work on it. Is there anybody to
> give some code pointer?

bubli gave a very modest pointer: sw/source/filter/html
Comment 12 Gülşah Köse 2016-03-25 19:09:25 UTC
I want to add some detail about that bug:

1-) Insert an image
2-) Export as noncropped.html
3-) Open noncropped.html in a web browser
4-) Rightclick of the image and inspect element.

Result:
* <div id=Image1 ... width and height attributes is true. When hover the div tag it shows correct area.
* <img ... width and height atrributes is true. When hover the <img tag it shows correct area.

1-) Insert an image
2-) Crop the image
2-) Export as cropped.html
3-) Open cropped.html in a web browser
4-) Rightclick of the image and inspect element.

Result:
* <div id=Image1 ... width and height attributes is true. When hover the div tag it shows correct(cropped) area.
* <img ... width and height atrributes is true(!). When hover the <img tag it shows WRONG area. It shows the original size of image area.
Comment 13 QA Administrators 2017-05-22 13:19:17 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2019-12-03 13:58:35 UTC Comment hidden (obsolete)
Comment 15 Milos Sramek 2019-12-04 16:23:14 UTC
The situation has not changed. I image is not cropped using both the Save As and Export options.
Tested in LO 6.3.3.2