Replies: 1 comment 2 replies
-
Hi @jrochkind, Yes, libvips is pixels per mm everywhere internally, it then converts to and from the format resolution on read/write. The |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, as far as I can tell, the TIFF format confusingly has built-in metadata for "x resolution" and "y resolution" that is a unitless number, with another metadata field
Resolution Unit
, which can be "inches" or "cm". https://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.htmli believe I have a tiff that has xres and yres set to
400
, and it's units set toinches
. That is, it is 400 DPI/PPI. (dots-per-inch, pixels-per-inch). (I'm not sure if using DPI/PPI is global or just American, if other countries use metric here? It is an annoying non-metric holdout!)exiftool
says:However, vipsheader seems to be set on converting from inches to... milimeters maybe?
vipsheader -a
says:This is the same file. It's still reporting to me that the "resolution unit" is inches, but... the xres and yres are NOT in inches, and are NOT (I believe) the values actually in the TIFF metadata, I think vipsheader has converted them?
Those, I think, are pixels-per-millimeter, it's converted the 400 DPI to dots-per-mm.
Especially since vips itself often takes
--dpi
as an argument, I really want to know the DPI, which was what happened to be in the original metadata in the first place in this case too.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions