Description: DrawImage record is not rotating images properly Steps to Reproduce: 1. Drag and drop attached EMF+ file to Writer 2. Compare attached image with file displayed by MS Word Actual Results: The image is not rotated (only scaled) Expected Results: The image is properly rotated and scaled. Reproducible: Always User Profile Reset: No Additional Info:
Created attachment 148120 [details] EMF+ which is wrongly displayed under Writer/Draw
@Bartosz, could you check that attached EMF? It looks distorted (skewed) inserted to Word, or opened with IrfanView, or Paint. But opens up without rotation/skew in Draw or inserted to Writer, but a bit under size as if needing to scale. Is the sample EMF *supposed* to be skewed/rotated and look distorted, and that is the issue?
Yes. The image should be distorted. I generated this EMF+ file from the source code available at: https://docs.microsoft.com/en-us/windows/desktop/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-drawimage(inimage_inconstpointf_inint)
To be able to open above link, you need to add close bracket to the link: https://docs.microsoft.com/en-us/windows/desktop/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-drawimage(inimage_inconstpointf_inint) .
https://docs.microsoft.com/en-us/windows/desktop/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-drawimage(inimage_inconstpointf_inint)/
Created attachment 148378 [details] EMF+ Image using DrawImage, rotated by 30 degrees
Created attachment 148381 [details] EMF+ Rotated image with DrawImagePoints without Shearing
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/e3ccc09417731e61d3d35ed4cc1a7436e05f5325%5E%21 tdf#122557 EMF+ Implement proper rotation support of DrawImage It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/3bd7f23e1ad74014584ffecb77434ddd5a068d82%5E%21 tdf#122557 EMF+ Implement Shearing for DrawImage records It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.