ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Generating circular image

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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?
8   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 28 2024 : 14:58:49
ImageEn tends not to use the Bitmap, which is just a standard TBitmap with many limitations. You can use the IEBitmap property which is our enhanced bitmap class:

http://www.imageen.com/help/TIEBitmap.html

Nigel
Xequte Software
www.imageen.com
HeartWare Posted - Jun 28 2024 : 07:40:22
Ah, yeah. The one thing I didn't try

I was focused on the Bitmap itself...

Thank you...
xequte Posted - Jun 28 2024 : 05:11:42
Hi

You should use:

ImageEnView1.IO.SaveToFile( 'image.png' );

https://www.imageen.com/help/TImageEnIO.SaveToFile.html

Nigel
Xequte Software
www.imageen.com
HeartWare Posted - Jun 28 2024 : 02:03:36
How do I extract the processed image and save it as a transparent PNG file? I've tried

Image.Bitmap.SaveToFile(...)

but the cut out area is not transparent. Have also tried "upgrading" the BitMap to 32-bit, fiddle around with Image.Proc.SetTransparentColor and other stuff, but can't get it to save the proper .PNG file with the transparency..
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.

Nigel
Xequte Software
www.imageen.com
HeartWare Posted - Apr 12 2024 : 03:10:36
Okay - installed v13.1 that I had lying around, but hadn't installed yet, and it now compiles.
HeartWare Posted - Apr 12 2024 : 02:41:59
"There is no overloaded version of 'Crop' that can be called with these arguments"

on the line:

Avatar.Proc.Crop(0,0,Avatar.Bitmap.Width,Avatar.Bitmap.Height,TIEShape.iesEllipse);

where

Avatar : TImageEnView;

Using: ImageEn Build 13.0.0.27.7132 @ 15-Nov-23 10:54:47
xequte Posted - Apr 12 2024 : 02:13:05
Hi

You can make a perfectly circular crop using:

https://www.imageen.com/help/TImageEnProc.Crop.html


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 );


Nigel
Xequte Software
www.imageen.com