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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Generative Art Collection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ken Randall

30 Posts

Posted - May 24 2022 :  20:50:43  Show Profile  Reply
Hi Nigel,

I want to create a collection of several hundred faces with different hats, eyes, mouth, etc.

What's my best starting point?

Regards,

Ken

Ken R

xequte

38175 Posts

Posted - May 24 2022 :  21:37:50  Show Profile  Reply
Hi Ken

If I was doing it:

- Create folders containing assets, Eyes folder, Hats folder, etc.
- Assets are transparent images, e.g. PNG files, or vector shapes like SVG, WMF, etc.
- Record the position information for each object, e.g. TallHat.png needs to be positioned at (10,20), Beret.png needs to be positioned at (10,50), etc. I would probably do it by having an information file of the same name, e.g. TallHat.png would have TallHat.ini, etc.
- Your application would then just randomly choose one asset from each folder and build up an image, drawing using a method like:

https://www.imageen.com/help/TIEBitmap.DrawToTIEBitmap.html



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

30 Posts

Posted - May 25 2022 :  04:06:33  Show Profile  Reply
Thanks Nigel. My first thought was to go with layers.

Ken R
Go to Top of Page

xequte

38175 Posts

Posted - May 25 2022 :  17:04:39  Show Profile  Reply
Hi Ken

In general, I would say that layers are for end-users rather than programmatic usage. Almost everything that can be done with layers in code, can also be done without them, so they add unnecessary abstraction (reduced performance, more complexity and potentially more bugs). There are some situations where using layers in code has benefits, but if everything you need done can be done with bitmaps, then stick with that.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: