Issue 74211 - Exporting cropped image (selection) shows wrong area
Summary: Exporting cropped image (selection) shows wrong area
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: 680m201
Hardware: All All
: P3 Normal with 1 vote (vote)
Target Milestone: ---
Assignee: Armin Le Grand
QA Contact:
Depends on:
Reported: 2007-02-06 10:25 UTC by wolframgarten
Modified: 2017-05-20 10:34 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---

bugdoc (22.89 KB, image/jpeg)
2007-02-06 10:26 UTC, wolframgarten
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description wolframgarten 2007-02-06 10:25:08 UTC
Open a new draw, insert the attached jpg. Crop it. Then export it to jpg. The
result shows a complete different area compared to what was supposed to be exported.
Comment 1 wolframgarten 2007-02-06 10:26:16 UTC
Created attachment 42777 [details]
Comment 2 sven.jacobi 2007-07-06 12:57:47 UTC
accepted, but I will not be able to fix this issue for OOo2.3 ->changed OOo2.4
Comment 3 sven.jacobi 2007-07-06 13:34:03 UTC
now the target is changed,
Comment 4 sven.jacobi 2008-01-21 15:25:45 UTC
I have to retarget this issue again...
Comment 5 sven.jacobi 2008-06-02 17:03:53 UTC
sorry, I have to change the target again.
Comment 6 Rainer Bielefeld 2013-05-16 16:43:05 UTC
The description is very than rare.

My test  with server installation of  "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1482523 Rev.1482259 (2013-05-15)]" on WIN7 Home Premium (64bit)", own separate user profile:

1. Opened new Draw document from AOO Start Center
2. Menu 'Insert -> Picture -> from file - reporter's bugdoc'
3. Cropped (using handles)so that the table around the cassette box became 
4. Clicked into white sheet area, then selected picture by mouse click
5. Menu 'File -> Export -> JPEG - newsample.jpg' <Export>
6. Checked new document: OK
7. Did again Step 5, but checked 'Selection' in Export Dialog (and of course 
   different name)
8.  Checked new document: 
   Bug: Top left area of cassette box + some Table at that area visible

I wonder what the relation to different "Bug 25744 - vertical borders of visible area of cropped picture shifted to the right during 'Export - Selection'" might be.

Back to CONFIRMED due to facts.
Comment 7 Rainer Bielefeld 2013-05-16 16:45:47 UTC
This one is not "Trivial", it makes Export of cropped pictures unusable.
Comment 8 Armin Le Grand 2013-05-17 14:00:22 UTC
ALG: Taking a look...
Comment 9 Armin Le Grand 2013-05-17 16:26:50 UTC
ALG: Identified problem; the MapMode and the logical size of the GraphicObject do not match the PixelSize. Since the cropping is done based on logic mapping, a wrong cropping is the result.
There are two solutions:
(a) scale the bitmap data to the size corresp. to the logic size and MapMode
(b) adapt cropping
With (a) quality and information will be lost from the bitmap data (in the example case it gets scaled smaller, but even scaling bigger adds no quality). Both work, I adapted (b) now and use it.
Also took the time to add OverlayObject to visualize the cropped part of the graphic in crop mode for better orientation of the user.
Preparing checkin...
Comment 10 SVN Robot 2013-05-17 16:29:12 UTC
"alg" committed SVN revision 1483903 into trunk:
i74211 Correct crop of bitmap data when logical size and MapMode do not match...
Comment 11 Armin Le Grand 2013-05-17 16:51:51 UTC
ALG: Okay, done.