serpro69 / kotlin-faker

Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.
https://serpro69.github.io/kotlin-faker/
MIT License
473 stars 44 forks source link

Random Profile Picture #251

Closed vanniktech closed 5 days ago

vanniktech commented 3 weeks ago

Would be nice if the Person in addition to the birthDate also has a way to obtain a profile picture ideally also with male/female/neutral just like we can do when generating names.

serpro69 commented 3 weeks ago

Hi @vanniktech , Thanks for the suggestion, sounds like a valid use-case, but would like some more details.

vanniktech commented 3 weeks ago

With consideration of https://github.com/serpro69/kotlin-faker/issues/226 the best might to just to get a ByteArray of an image with 32bit RGBA values?

Ideally, different pictures. Regarding the source, I don't have one in mind.

serpro69 commented 3 weeks ago

With consideration of #226 the best might to just to get a ByteArray of an image with 32bit RGBA values?

Good point.

I also don't know where one would be able to get pics that can be used for this, considering all sorts of things like privacy etc on top of it. But I'll try to research a bit. Feel free to update with more details if you come up with something.

vanniktech commented 1 week ago

https://uifaces.co/ this is as close as I've gotten when I took some time today to find some pictures.

serpro69 commented 6 days ago

Good find, @vanniktech , thanks! I've downloaded all the avatars and pushed them to a separate repo for now - https://github.com/serpro69/uifaces-ai-avatars I'm not sure yet if I want to fetch and read avatars from remote location, or include as part of the jar. With the latter, I'd probably use a separate module, so that the size of the core module jar isn't needlessly increased.

Would you like to submit a PR for this? Otherwise I can take a look at implementing it myself.

vanniktech commented 6 days ago

Would you like to submit a PR for this? Otherwise I can take a look at implementing it myself.

I'm currently traveling so I have limited time. Doing it in a separate module sounds perfect!

serpro69 commented 6 days ago

Did some very simple implementation in #254 . Feel free to take a look and provide some feedback, if you like ;)

serpro69 commented 5 days ago

Should be available in the latest 2.1.0-SNAPSHOT version once the build is complete.