The current implementation in odt.conf for cover-images adds:
style:rel-width="100%" style:rel-height="scale".
For an image with the dimensions 2097x287, this should show the image in LibreOffice with a proportional width and height. However when opened in LibreOffice the width is indeed 100%, but the height seems to be the same as the width. So scale seems to be implementing "height" instead and the image ends up looking square instead. If you look in the Picture-properties in LibreOffice you can see the following values:
Modifying this Scale to Width: 100% and Height: 100% does the right thing.
If you save the file again, LibreOffice adds it this to the draw:frame:
svg:width="177.69mm" svg:height="24.31mm"
Without this working properly, LibreOffice only understands exact dimensions. Which means as producer (ODF backend) you need to get image dimensions and apply that to the page dimensions and all kinds of crazy shit ;-)
The current implementation in odt.conf for cover-images adds:
For an image with the dimensions 2097x287, this should show the image in LibreOffice with a proportional width and height. However when opened in LibreOffice the width is indeed 100%, but the height seems to be the same as the width. So scale seems to be implementing "height" instead and the image ends up looking square instead. If you look in the Picture-properties in LibreOffice you can see the following values:
Modifying this Scale to Width: 100% and Height: 100% does the right thing.
If you save the file again, LibreOffice adds it this to the draw:frame:
Without this working properly, LibreOffice only understands exact dimensions. Which means as producer (ODF backend) you need to get image dimensions and apply that to the page dimensions and all kinds of crazy shit ;-)