Closed jstbyte closed 5 years ago
There is no such parameter as "DPI" within an image, DPI is evaluated from resolution when it's applied to particular physical dimensions. So exact same image will have different DPI depending on will it be displayed on 5.5" smartphone, 25" monitor or printed on an A4 paper.
There's no way to set the DPI using the
imaging
API. Theimaging.Save
andimaging.Encode
functions use packages from the standard library (e.g.image/jpeg
) andgolang.org/x/image
subpackages to encode images. These packages don't support saving or retrieving image metadata such as DPI.