Apache OpenOffice (AOO) Bugzilla – Issue 74211
Exporting cropped image (selection) shows wrong area
Last modified: 2017-05-20 10:34:18 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.
Created attachment 42777 [details] bugdoc
accepted, but I will not be able to fix this issue for OOo2.3 ->changed OOo2.4
now the target is changed,
I have to retarget this issue again...
sorry, I have to change the target again.
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 invisible 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.
This one is not "Trivial", it makes Export of cropped pictures unusable.
ALG: Taking a look...
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...
"alg" committed SVN revision 1483903 into trunk: i74211 Correct crop of bitmap data when logical size and MapMode do not match...
ALG: Okay, done.