Bug 42038 - Cropped images not cropped on "Save as > html" or "Export > xthml"
Summary: Cropped images not cropped on "Save as > html" or "Export > xthml"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:html
: 95660 (view as bug list)
Depends on:
Blocks: Image-Crop (X)HTML-Export
  Show dependency treegraph
 
Reported: 2011-10-20 03:10 UTC by Milos Sramek
Modified: 2023-07-29 22:31 UTC (History)
4 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
Comment 16 Stéphane Guillou (stragu) 2021-06-25 14:36:15 UTC
Reproduced for both "Save as > HTML" and "Export... > XHTML" in:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: e3086b58eb5427d520b86c185f9d911bb6f7a3a0
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-21_15:37:11
Calc: threaded

and:

Version: 7.2.0.0.beta1 / LibreOffice Community
Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 17 Stéphane Guillou (stragu) 2021-06-28 07:27:16 UTC
Reproduced on Windows 10 as well, with:

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: en-AU (en_AU); UI: en-US
Calc: threaded
Comment 18 QA Administrators 2023-06-29 03:13:11 UTC Comment hidden (obsolete)
Comment 19 Stéphane Guillou (stragu) 2023-06-29 13:17:39 UTC
Reproduced with:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3551d18404cb19cdaa8edb170a549f5c5405d0cb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Also present in OOo 3.3 (at least for the Save As filter) so marking as inherited.
Comment 20 Stéphane Guillou (stragu) 2023-07-29 21:12:32 UTC
*** Bug 95660 has been marked as a duplicate of this bug. ***