How to reinstall BMP file resolution indicator (DPI)?

I have a BMP with a label of 299 DPI. I would like to change this to 99 DPI.

It is important to note that the DPI marker in BMP has no structural meaning. An image has a specific width and height in pixels. A display application can display an image of any width in inches.

So DPI is just a hint.

However, I am dealing with some third-party programs that behave differently depending on this token, so I need to reinstall it.

I will be grateful for suggestions on how to do this programmatically in Java, as well as in graphical GUI tools (e.g. Gimp).

+3
source share
2 answers

Java, img4j. BMP. InfoHeader iXpixelsPerM iYpixelsPerM . BMP , .

, , , , ( ).

( !:)

+2

.Net DPI SetResolution Bitmap. , , Java. [ , " ( Java)", .NET.]

GIMP: http://docs.gimp.org/en/gimp-image-print-size.html
Paint.Net( .Net) Image โ†’ Resize โ†’ .

+2

Source: https://habr.com/ru/post/1783003/


All Articles