Thanks for the contribution, will be included for the next release :)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
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
//Palette := @ImageData.Palette; wrong
Palette := ImageData.Palette; // ok
Palette := @ImageData.Palette[0]; // also ok, if ImageData.Palette <> nil
ReduceColors(ImageData, NumberOfColors);
ConvertImage(ImageData, ifIndex8); // added
Palette := ImageData.Palette;
Page created in 0.030 seconds with 20 queries.