Do I understand from this topic http://galfar.vevb.net/imaging/smf/index.php/topic,283.0.html (http://galfar.vevb.net/imaging/smf/index.php/topic,283.0.html) that the library supports the print resolution of JPEGs (in pixels per inch or pixels per cm)? How to set it up? Thanks!
You can get print resolution from JPEGs (provided that this info is embedded inside) using metadata framework.
It's not stored in image itself so you need to keep track of it if you want to later save the values that were loaded.
type
// defined in Imaging.pas
TResolutionUnit = (
ruSizeInMicroMeters, // value is pixel size in micrometers
ruDpi, // value is pixels/dots per inch
ruDpm, // value is pixels/dots per meter
ruDpcm // value is pixels/dots per centimeter
);
var
XRes, YRes: Single;
ResUnit: TResolutionUnit;
... load image ...
ResUnit := ruDpi;
if GlobalMetadata.GetPhysicalPixelSize(ResUnit, XRes, YRes) then
begin
... print resolution present, do something with it
end;
... do something with image
GlobalMetadata.SetPhysicalPixelSize(ResUnit, XRes, YRes, True)
... save image
Checkout TMetadata class in Imaging.pas for implementation details.