FHannes Posted November 2, 2013 Share Posted November 2, 2013 Lots of TSCARBitmap related changes in this version. As well as several bugfixes, new functions and more... Downloads: SCAR Divi Development Changelog: Bugfixes: - ActivateClient restored window when maximized - TPAUnique didn't function properly - A bug in Delphi's VCL framework prevented palette based PNG imaged to be loaded correctly by TSCARBitmap - Several png formats were unsupported or lost transparency - FloodFill(Tol)(Ex) threw exceptions due to an implementation flaw - Code in form designer wasn't being highlighted New: - procedure SortTPAByX(var TPA: TPointArray); - procedure SortTPAByY(var TPA: TPointArray); - TChrono class to measure time intervals - TObject.ClassName - procedure ClampInt(var Value: Integer; const Min, Max: Integer); - procedure ClampExt(var Value: Extended; const Min, Max: Extended); - procedure ClampTIA(var TIA: TIntArray; const Min, Max: Integer); - procedure ClampTEA(var TEA: TExtArray; const Min, Max: Extended); - function MoveFile(const OldPath, NewPath: string): Boolean; - TSCARBitmap.ClearEx - function CopyFile(const OldPath, NewPath: string): Boolean; - function IsValidPath(const Path: string): Boolean; - TBmpResampler = (brNearest, brBilinear, brBicubic, brSuperSample); - procedure TSCARBitmap.ResizeEx(const NewWidth, NewHeight: Integer; const Resampler: TBmpResampler); - procedure TSCARBitmap.ClearAlpha; - procedure TSCARBitmap.ClearAlphaEx(const Alpha: Byte); - procedure TSCARBitmap.SetAlpha(const Color: Integer; const Alpha: Byte); - procedure TSCARBitmap.SetAlphaEx(const Colors: TIntArray; const Alpha: Byte); - property TSCARBitmap.Alpha[const X, Y: Integer]: Byte; - procedure TSCARBitmap.Reduce(const MaxColors: Integer); - procedure TSCARBitmap.SetPixelsEx(const TPA: TPointArray; const Colors: TIntArray); - TFile = class(TPersistent) - TImageFile = class(TFile) - TAnimImageFile = class(TImageFile) - TPNGFile = class(TAnimImageFile) - TGIFFile = class(TAnimImageFile) - TResizeAnchor = (raCenter, raTop, raTopRight, raRight, raBottomRight, raBottom, raBottomLeft, raLeft, raTopLeft); - procedure TSCARBitmap.ResizeCanvas(const NewWidth, NewHeight: Integer; const ResizeAnchor: TResizeAnchor); Tweaks: - Optimized TPASpread, SortTPA(Ex) and TPARemoveEx - Rewritten SplitTPA(Ex) for added performance - TPADelete now raises an exception when the index fall outside of the array boundaries - TPARemove now removes the first point instead of the last when removing just one - Editor now shows icon to indicate modifications in tab - New clean look - Improved TSCARBitmap.SaveToPng performance - Merged in changes from official PascalScript codebase: * Support Include/Exclude for sets * Support iterating over enum types - Proper alpha channel support in TSCARBitmap - TSCARBitmap.Pixels renamed to TSCARBitmap.Pixel - TSCARBitmap.DrawTo(Ex) now has the "Blend" parameter for alpha blending - Significant performance tweaks for the PascalScript compiler - TSCARBitmap is now a descendant of TPersistent Removed: - TSCARObject - Automated resource freeing for (previous) TSCARObject descendants - function BmpFromStrLegacy(const W, H: Integer; const Str: AnsiString): TSCARBitmap; - Update Bitmaps tool Enjoy ~Freddy Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 6, 2013 Author Share Posted November 6, 2013 A new build is available which adds TJPEGImage, which was still missing. Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 6, 2013 Share Posted November 6, 2013 Epic.. as usual... I'll try it out tomorrow when I get time. Keep up the good work Quote Link to comment Share on other sites More sharing options...