How to edit an image without changing its dpi?

I have an image with a dpi of 600,600, but when i edit it, the dpi reduces to a very small value. How can I edit it without changing the dpi?