I exported a graphic as a 600 dpi .png bitmap. However the saved image is 599.999 dpi. I’m not familiar with vector graphics, but all the bitmap graphics I have worked with all use whole numbers for pixels and dpi/ppi.
Is creating a non-whole number size bitmap typical when using vector graphics?
I tried re-sizing the vector graphic image in Inkscape, but every time I export as a .png and look at the image it is always 599.999 dpi.
Is there a way to export to a whole number size?
Export bitmap dpi ?
Re: Export bitmap dpi ?

Welcome to InkscapeForum!
Yes, I've noticed that too. Typically I never use anything except the default 90, and it's never been important enough to me to investigate. But I have seen round numbers shown as not so round -- the other day I saw x.98 (testing someone else's problem) and just now, it's x.22.
When I tried it just now, I changed dpi from 90 to 95. I used the Browse button to find the folder I wanted, and after I chose the folder, 95.00 had been changed to 95.02. Trying same routine on a different selection, and after choosing folder, it's 95.28! Interesting -- I changed it back to 95.00, and clicked Browse again. Just before the file manager opened (for choosing the folder) I saw the value change back to 95.02. I cancelled the file manager and changed again to 95.0. This time it stayed 95.0 when I clicked Browse.
Well, I've gone through the same routine 4 times now:
1 -- change dpi
2 -- clicking Browse button changes that value by a fraction of a pixel (different fraction every time)
3 -- close file manager and change dpi back to desired value
4 -- clicking Browse triggers the change again
5 -- change dpi back to desired value -- sometimes I've had to repeat this 5 times, before it finally retains the desired value -- the least I've had to repeat is twice
However, I find that if I close the Export Bitmap dialog, after changing the dpi, then reopen it, the value is retained after clicking Browse.
Tested with 0.48.4 on Win7, 64-bit. Tested using Selection, and Page options. Assuming same will hold for Drawing and Custom options. I suppose this should be reported as a bug, but meanwhile I'll be interested to see other operating systems tested. Or...maybe there's some reason for this, although I can't imagine what it might be.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Export bitmap dpi ?
Clearly Inkscape cannot export half a pixel, or any fraction of a pixel. Therefore it has to calculate the DPI based on image dimensions and whole pixel bitmap dimensions. If you want x inches output to y pixels, you can see that sometimes Inkscape will round off and sometimes it won't need to and sometimes it's just going to show a decimal number.
Your mind is what you think it is.
Re: Export bitmap dpi ?
Ah, you understand these things much better than I do, druban! But I don't understand your comments here.
Are you saying that since the resulting dimensions can only be whole values, the dpi value is changed to the closest fraction which will result in the rounded off dimensions?
I'm not using inches, only pixels, and only whole pixels. And while I understand that changing a whole dimension by a whole dpi value could result in a fraction, I don't understand why the dpi value sometimes changes to a fraction and sometimes doesn't. I mean, for the same object or page size.
As long as I leave the dpi alone, at 90.00, it never reflects any fractional value, no matter what is the size of the selection, page, etc. But once I change it, it's crazy -- it's really hard to make it be 90.00 again, and stay 90.00!
In many other parts of Inkscape, clicking in another field, or on the canvas, or pressing Enter key, will apply the value you've entered in a field. So I had thought that clicking Browse might be simply applying the value I entered (for dpi). However, in Export Bitmap dialog, Enter does not apply the requested value.
It does have some effect though. I guess the height value for dpi is grayed out, becaue you can't have a different dpi for width than you have for height. If you change the dpi and press Enter, you can see the height value change to match it (even though it's grayed out). But it doesn't apply the value, or i.e. display the fraction value. That only happens if you click Browse. ....OR....if I click in one of the pixels dimension fields, that behaves as I expect.
Well, all in all, it seems like inconsistent behavior to me. But here's me, at the moment:
! Maybe things will seem more clear tomorrow?
Are you saying that since the resulting dimensions can only be whole values, the dpi value is changed to the closest fraction which will result in the rounded off dimensions?
I'm not using inches, only pixels, and only whole pixels. And while I understand that changing a whole dimension by a whole dpi value could result in a fraction, I don't understand why the dpi value sometimes changes to a fraction and sometimes doesn't. I mean, for the same object or page size.
As long as I leave the dpi alone, at 90.00, it never reflects any fractional value, no matter what is the size of the selection, page, etc. But once I change it, it's crazy -- it's really hard to make it be 90.00 again, and stay 90.00!
In many other parts of Inkscape, clicking in another field, or on the canvas, or pressing Enter key, will apply the value you've entered in a field. So I had thought that clicking Browse might be simply applying the value I entered (for dpi). However, in Export Bitmap dialog, Enter does not apply the requested value.
It does have some effect though. I guess the height value for dpi is grayed out, becaue you can't have a different dpi for width than you have for height. If you change the dpi and press Enter, you can see the height value change to match it (even though it's grayed out). But it doesn't apply the value, or i.e. display the fraction value. That only happens if you click Browse. ....OR....if I click in one of the pixels dimension fields, that behaves as I expect.
Well, all in all, it seems like inconsistent behavior to me. But here's me, at the moment:

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Export bitmap dpi ?
I think you understand it pretty well or at least as much as it can be uderstood by anyone who isn't a programmer and that excludes me as well!
I think Inkscape is always calculating the size of the bitmap export from the x and y coordinates plus the width and height, and then rounding down or up etc. Even when your page and objects are in pixels, 'dpi' has to be calculated by converting said objects dimensions to inches and then dividing the pixel dimensions by that number. Some inaccuracy must be taking place internally...
Put it this way - either the pixel dimensions have to be whole or the DPI has to be whole. Pixel dimensions can't ever be decimal numbers.
Try this to see what happens - click the up arrow on the dpi spinbox. With each click, your dpi changes, but each click does not change both the width and height in the dimensions boxes! Sometimes one sometimes the other, sometimes both.
Well, I don't really know why I thought that would help --- sorry. But it is kind of cool
I think Inkscape is always calculating the size of the bitmap export from the x and y coordinates plus the width and height, and then rounding down or up etc. Even when your page and objects are in pixels, 'dpi' has to be calculated by converting said objects dimensions to inches and then dividing the pixel dimensions by that number. Some inaccuracy must be taking place internally...
Put it this way - either the pixel dimensions have to be whole or the DPI has to be whole. Pixel dimensions can't ever be decimal numbers.
Try this to see what happens - click the up arrow on the dpi spinbox. With each click, your dpi changes, but each click does not change both the width and height in the dimensions boxes! Sometimes one sometimes the other, sometimes both.
Well, I don't really know why I thought that would help --- sorry. But it is kind of cool

Your mind is what you think it is.
Re: Export bitmap dpi ?
I realize that Inkscape cannot export half a pixel. It’s just that every other graphic program I have used indicates whole number dpi and lists the image size accordingly.
Right now my .png file is 599.999 dpi and an image width of 2.375 inches. Resizing the image to 600 dpi does not change any of the image parameters, probably because it’s such a small change.
My concern is when it comes to printing the .png image. Everything I have ever read says it’s best to send your printer an image in multiples of it’s native printing resolution. That way you’re not relying on the printer to do the rescaling & presumes that your software can do a better job. Of course that would depend on your resizing software.
Currently my logo looks very good when printed. I was just hoping there was a way to have the image saved at an actual 600 dpi.
Right now my .png file is 599.999 dpi and an image width of 2.375 inches. Resizing the image to 600 dpi does not change any of the image parameters, probably because it’s such a small change.
My concern is when it comes to printing the .png image. Everything I have ever read says it’s best to send your printer an image in multiples of it’s native printing resolution. That way you’re not relying on the printer to do the rescaling & presumes that your software can do a better job. Of course that would depend on your resizing software.
Currently my logo looks very good when printed. I was just hoping there was a way to have the image saved at an actual 600 dpi.
Re: Export bitmap dpi ?
After a few tries, I could make the Export Bitmap dialog accept the whole number. But it probably still exports the fraction....I'm guessing.
Maybe your print shop could address that?
Maybe your print shop could address that?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design