Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
HeartWare
Posted - Apr 11 2024 : 23:46:24 If I have an image, say 256x256, and I want to "mask out" the surrounding area so that only a circle of radius 256 pixels is shown in a TImageEnView component (sort of like the common way to display avatars on various online sites), how would I do this?
4 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Apr 12 2024 : 15:58:26 Hi
Yes, it was introduced in 13.1.0. Also in the upcoming release you can force a perfect circle.
sz := imin( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height );
x := ( ImageEnView1.Bitmap.Width - sz ) div 2;
y := ( ImageEnView1.Bitmap.Height - sz ) div 2;
ImageEnView1.Proc.Crop( x, y, x + sz, y + sz, iesEllipse );