How to specify pixel/mm AND total page size on BMP export?

Discuss the drawing application
Post Reply
swampwiz
Posts: 40
Joined: Wed Mar 17, 2010 11:30 am

How to specify pixel/mm AND total page size on BMP export?

Post by swampwiz »

First let me explain what I am trying to do, and the forum can tell me how to proceed, perhaps with the use of an add-on.

I have a set of Draw documents in which I have carefully placed geometric shapes, all specified in mm, inside a Page whose ruler is in mm also. At the end I want to have this rendered to a bitmap of 50 pixel/mm. Now before folks start commenting on the input specifications of commercial printers, etc., let me say that this bitmap is to be used by a CNC manufacturing machine to produce a cut piece of sheet plastic that conforms to the bitmap, and the machine simply reads in the bitmap; in fact, the BMP header specifies resolution in pixels per meter. And I am not even interested in that being written into the file as I can pop that in with a binary file viewer app directly. And the bitmap only needs 1 bit per pixel and "1" indicates that the material exists whereas "0" indicates not. At this point I have the drawing as having the viewable colors as either White of Grey 5.

When I try to export, the dialog gives controls for the resolution and page size, but a change in one causes the other to change, seemingly to keep the total # of pixels for the page to be some preset amount. I suppose I could do the ridiculous thing and increase the size of the page so as to get more pixels, but at the point, I don't even know the formula. When the dialog comes up, it initially says the height & width is 500.00 mm each (which is what I had set it to), and then 37 pixels per cm; when I change the resolution to 500 pixels/cm, it changes the height & width to 37.8 mm, meaning that it's screwy even with that! What I would like for that dialog to allow me to do is specify the 500 mm in height & width AND the resolution as 500 pixels/cm.

EDIT: OK, I trying increasing the size to 3000 x 3000 mm (the maximum, it seems),and then when I tried to export, it gave me the errors: "Graphics Filter not found" & "Error saving the document".
Windows XP Professional, Version 5.1, Service Pack 3
OpenOffice 4.1.2
(perhaps later versions since these are really old and obsolete -- MrProgrammer, forum moderator)
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to specify pixel/mm AND total page size on BMP expor

Post by acknak »

Are you still using AOO 3.1.1, as indicated in your forum signature? If so, it's time to upgrade. The image export feature was significantly improved in recent versions. The File > Export ... feature lets you specify the width and height of the exported image, in pixels, and you can also set the resolution in pixels/cm.
AOO4/LO5 • Linux • Fedora 23
swampwiz
Posts: 40
Joined: Wed Mar 17, 2010 11:30 am

Re: How to specify pixel/mm AND total page size on BMP expor

Post by swampwiz »

My current version is 4.1.2. And my description of the behavior is completely accurate
Windows XP Professional, Version 5.1, Service Pack 3
OpenOffice 4.1.2
(perhaps later versions since these are really old and obsolete -- MrProgrammer, forum moderator)
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to specify pixel/mm AND total page size on BMP expor

Post by acknak »

Then you can check the dimensions of the drawing objects you want to export (or export the whole page) and multiply the width and height (in mm) times 50 (pixels per mm) and enter those numbers in the image export box.

You may run into limits exporting a whole page at that resolution (a US letter page will be almost 14,000 pixels high) OO Draw crashed when I tried to export a whole page at 50 pixels/mm.
AOO4/LO5 • Linux • Fedora 23
Post Reply