How retain dimensions when export odg object to PNG

When I select a 6.74 by 2.43 object in Draw and export it to a PNG file, the dimensions in PNG are not correct.

On the PNG Options page, I try to specify the correct dimensions of the object. However, after I enter them, 2.43 is changed to 8.72.

I am baffled by this behavior and can’t find anything in either the user guide or help files that helps me understand what is going on. What am I missing?Number vs Temperature graphic.odg

You did not specify in which resolution you exported your image?

I don’t change the resolution. Would resolution change the dimensions?

I also noticed that while I selected only one object, both objects in the file are exported. How can I prevent that?

Can you upload your draw file here? Edit your question select the attachment icon and upload your file. Thank you. I can take a look at it then.

Thank you for offering to take a look! I have uploaded the file.

Not a PNG, I meant Draw’s ODG.
What do you want to do exactly with the exported PNG file?
Why does it have to be that measure?

oops. Didn’t mean to do that.Just uploaded the odg file. It doesn’t have to be that exact size but I want to understand what determines the final size and how to control it.

Hi @catbill, I have to apologize to you. I think I have now fully understood what your problem is. These are the values ​​you enter in the PNG Options dialog box, right?

Based on your file, I will give you an example.
The upper right graphic with the bars shows me the dimensions for Width = 9.75 cm and Height = 6.17 cm in the sidebar (Ctrl + F5).

image description

I choose File>Export .... In the dialog box “Export” i select PNG and “Selection” and enter a name. I click on “Save”.

In the following dialog box “PNG Options”. The data entry is a little tricky.

First select the “Resolution”: for example, 300 pixels / cm. If you click in Width now, the values ​​change. Now enter the value = 9.75 for Width and click in the field Height. There, the value changes to 6.16. The calculation does not give exactly 6.17. That is not bad.

The smaller your value for the resolution, the more the calculation may change the value for Hight. But at 300 pixels/cm, it should work well most of the time.

Of course, at 300 pixels/cm, the exported file also becomes larger, e.g. 2.51 MB. I hope that’s what you were looking for.

Good luck trying out.

If my answer has solved your problem, please click on the checkmark ✓ in the circle image description to the left of the answer and click on the arrow ^ for upvote. This will tell the community that the question has been answered correctly.

With me Windows 10 Home; Version 1903; 64-Bit | LibreOffice, Version: 6.2.5.2 (x64).

Hi ebot,
No apologies needed. You are a great resource. Thank you for taking the time to look at the file, provide screenshots, and explain things so clearly.
From one of your screenshots, I was finally able to see my problem. Fortunately, you put little arrows on the Export dialog. That forced me to see an option for Selection. When I checked that, the export worked as expected. So, before I checked that, Draw was assuming that I wanted to export the whole page.

In my opinion, this is a poor user interface. Since I had already selected the object, I did not expect to be asked again if that is what I want to export. Nor would I ordinarily look in that location for a crucial option.

Anyway, thank you again for your help. I hope that this information is helpful to others.