braedsjaa
2008-02-29 18:44:16 UTC
I am writing a database application which needs to export documents in
RTF format. So far text export is working well but now we need to
include jpeg images. The rtf format uses dpi resolution as well as
pixel dimensions to work out image size on page which means that
before I can include the actual jpeg data in the exported file I need
to find out this metadata from which to calculate resizing ratios in
order to display reasonably.
I was hoping to use perl or PHP but for all my searching I only find
numerous ways to get the size in pixels but can't figure out how to
get the resolution information I need.
(if it is in EXIF that can't be relied upon to always be present)
Any ideas?
RTF format. So far text export is working well but now we need to
include jpeg images. The rtf format uses dpi resolution as well as
pixel dimensions to work out image size on page which means that
before I can include the actual jpeg data in the exported file I need
to find out this metadata from which to calculate resizing ratios in
order to display reasonably.
I was hoping to use perl or PHP but for all my searching I only find
numerous ways to get the size in pixels but can't figure out how to
get the resolution information I need.
(if it is in EXIF that can't be relied upon to always be present)
Any ideas?