I want to load an image, change it's color depth, resize it and save.
All attempts yield larger files than any other image processing software that I have used using the same source image and image parameters.
eg.
Corel yields 13k file
ImageEn yields 40k file
All with the same settings ?
Please advise - thanks
Thumb.ClearAll;
// Set DPI
Thumb.IO.Params.DpiX:= 96;
Thumb.IO.Params.DpiY:= 96;
// Set to 256 colors
Thumb.IO.Params.BitsPerSample:= 8;
Thumb.IO.Params.SamplesPerPixel:= 1;
//
Thumb.IO.LoadFromFile(OpenPictureDialog1.FileName);
Thumb.RemoveAlphaChannel;
// Set again just in case it was blown away by load
// Set DPI
Thumb.IO.Params.DpiX:= 96;
Thumb.IO.Params.DpiY:= 96;
// Set 256 colors
Thumb.IO.Params.BitsPerSample:= 8;
Thumb.IO.Params.SamplesPerPixel:= 1;
// Set Size
Thumb.Proc.Resample(100, 100, rfFastLinear, True);
Thumb.Update;
//
Thumb.IO.Params.JPEG_Quality:= 80;
Thumb.IO.SaveToFileJpeg(fMain.UserAppDataPath+'Work\Thumbnail.jpg');
Andy