On a black and white image, is there a way to calculate how much black and how much white is used?
There you go Myron has a simple solution like
Sub AreaOfShapeMM()ActiveDocument.Unit = cdrMillimeter MsgBox Round(ActiveShape.DisplayCurve.Area, 2) & " Sq mm"End Sub
1. Open Macro Manager docker (Alt+shift+F11) or Windows/Dockers/Macro Manager2. Right-click on Visual Basic for Applications & choose New Macro Project.3. Name the file with no spaces i.e. AreaOfShapeMM to C:\Users\Myron\AppData\Roaming\Corel\CorelDRAW Graphics Suite X7\Draw\GMS Hit Save.4. You’ll see it pop up at the bottom of the Macro Manager list, click off off it then right click and choose New Module.5. Click off the the New Module then right-click on it and choose New Macro6. Copy/paste all code given over the “Sub Macro1() End Sub”7. Select a shape then double-click the macro8. Now you can assign a keyboard shortcut of your choosing to it. Right-click on the macro from the Macro Manager and choose Assign Keyboard Shortcut.9. type the shortcut you want in and hit assign.
Hi Myron,
Thank you.
I've done that, not sure if it is working, where do I see my results, do I need to open something?
open macro manager, find your macro, select the shape you want to get the sq mm, double-click the macro
I think they may be misinterpreting your question here, or maybe I am?You have a black and white image and want to know how many pixels are black and how many white,and then you want to know how much that is in square millimeters, right?Not sure I can help you all the way but here is an online calculator to count the number of pixels for each color.But since a pixel doesn't really have a specific size, you have to manually calculate how much that is in sq mm,based on the size of the image and its resolution in pixels per mm.