Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Avatars for Users Similarly to GitHub #6

Closed
redsky17 opened this issue Jan 19, 2019 · 5 comments · Fixed by #416
Closed

Generate Avatars for Users Similarly to GitHub #6

redsky17 opened this issue Jan 19, 2019 · 5 comments · Fixed by #416
Labels
enhancement New feature or request
Milestone

Comments

@redsky17
Copy link
Member

Rather than taking the first letter of the display name and using that to create a simple avatar for users that don't have one, do something like what GitHub does instead. Each avatar is unique for the entire username rather than just defaulting to the first letter of their display name.

@redsky17 redsky17 added this to the 0.7.0 milestone Feb 7, 2019
@redsky17 redsky17 added the enhancement New feature or request label Feb 7, 2019
@deepbluev7 deepbluev7 removed this from the 0.7.0 milestone Feb 25, 2020
@adasauce
Copy link
Contributor

CATS

@adasauce
Copy link
Contributor

from the matrix room

cadence

I just noticed nheko #6 here about generating picture avatars as placeholders rather than using the first letter. I like this idea, but I thought of something much prettier...

(Issue: https://github.com/Nheko-Reborn/nheko/issues/6)

David Revoy has created these bird and cat avatar generators with his own code and art. I expect he'd be open to allowing nheko to use these graphics. I think this would be much more cute and fun than the boring patterns that GitHub has.

https://www.davidrevoy.com/article720/bird-avatar-generator

https://www.davidrevoy.com/article591/cat-avatar-generator

PNG and ORA files licensed under: CC-By 4.0 attribution: David Revoy with the following exception: Generated pictures used as Avatar (for blog,forum,social-network) don't need direct attribution and so, can be used as regular avatars without pasting David Revoy's name all over the place. (thank you)

Ingwie Phoenix

That'd be a very cute "blank" avatar! I am very bored of generally seeing applications just using a simple color and a letter. Those cute birdies would look great

Nico

Yeah, but the cats would fit N(h)eko much better! ;p
Someone would need to reimplement the generator in C++ though, I won't bundle a php interpreter and I would prefer not to rely on a 3rd party web service :3

Ingwie Phoenix

https://framagit.org/Deevad/cat-avatar-generator/-/blob/master/cat-avatar-generator.php#L18-46 This doesnt look impossible to do :)

adasauce

how large is the asset set required to generate them?
all the different cat variations

nephele

I have seen some people use those avatars in matrix too (though the having to provide attribution part is a bad hard with avatars in generall)

Nico

40 files or 60
https://framagit.org/Deevad/cat-avatar-generator/-/tree/master/avatars%2Fcat

@redsky17
Copy link
Member Author

redsky17 commented Mar 23, 2020

So I implemented JDenticon in C++/Qt as a Qt plug-in for the generation support in nheko. If someone wants to go ahead and fork that repo to add support for the cats, that'd be awesome! Nheko already had been updated to check for the existence of that plug-in at launch, so it'd just be a matter of updating nheko to actually use it (this is the part I did not get to).

@redsky17
Copy link
Member Author

Repo in question:
https://github.com/redsky17/qt-jdenticon

@cloudrac3r
Copy link
Contributor

Would this overlay the cat parts live as the avatar, or would it render all the parts to a single image and use that image as the avatar?

@deepbluev7 deepbluev7 added this to the 0.7.1 milestone Apr 8, 2020
deepbluev7 added a commit that referenced this issue Dec 17, 2022
Backtrace:

Thread 1 "nheko" received signal SIGSEGV, Segmentation fault.
containerWidget (w=w@entry=0x0) at /usr/src/debug/dev-qt/qtwidgets-5.15.7/qtbase-everywhere-src-5.15.7/src/widgets/styles/qstylesheetstyle.cpp:2467
2467        if (const QAbstractScrollArea *sa = qobject_cast<const QAbstractScrollArea *>(w->parentWidget())) {
(gdb) bt
 #0  containerWidget(QWidget const*) (w=w@entry=0x0) at /usr/src/debug/dev-qt/qtwidgets-5.15.7/qtbase-everywhere-src-5.15.7/src/widgets/styles/qstylesheetstyle.cpp:2467
 #1  0x00007ffff4aa0ad6 in QStyleSheetStyle::drawPrimitive(QStyle::PrimitiveElement, QStyleOption const*, QPainter*, QWidget const*) const (this=0x555559917900, pe=<optimized out>, opt=0x55555ea4b5c0, p=0x7fffffffcfd0, w=0x0) at /usr/src/debug/dev-qt/qtwidgets-5.15.7/qtbase-everywhere-src-5.15.7/src/widgets/styles/qstylesheetstyle.cpp:4452
 #2  0x00007fff61d4a86b in KQuickStyleItem::paint(QPainter*) (this=this@entry=0x55555ea4a1e0, painter=painter@entry=0x7fffffffcfd0) at /usr/src/debug/kde-frameworks/qqc2-desktop-style-5.101.0/qqc2-desktop-style-5.101.0/plugin/kquickstyleitem.cpp:1667
 #3  0x00007fff61d4b22a in KQuickStyleItem::updatePolish() (this=0x55555ea4a1e0) at /usr/src/debug/kde-frameworks/qqc2-desktop-style-5.101.0/qqc2-desktop-style-5.101.0/plugin/kquickstyleitem.cpp:1928
 #4  0x00007ffff57717c2 in QQuickWindowPrivate::polishItems() (this=0x55555ea2e760) at /usr/src/debug/dev-qt/qtdeclarative-5.15.7-r1/qtdeclarative-everywhere-src-5.15.7/src/quick/items/qquickwindow.cpp:393
 #5  0x00007ffff570f4ef in QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*, bool) (this=this@entry=0x5555598eb770, w=w@entry=0x7fffe000aef0, inExpose=inExpose@entry=true) at /usr/src/debug/dev-qt/qtdeclarative-5.15.7-r1/qtdeclarative-everywhere-src-5.15.7/src/quick/scenegraph/qsgthreadedrenderloop.cpp:1576
 #6  0x00007ffff5710a8e in QSGThreadedRenderLoop::handleExposure(QQuickWindow*) (this=0x5555598eb770, window=<optimized out>) at /usr/src/debug/dev-qt/qtdeclarative-5.15.7-r1/qtdeclarative-everywhere-src-5.15.7/src/quick/scenegraph/qsgthreadedrenderloop.cpp:1374
 #7  0x00007ffff43d2b45 in QWindow::event(QEvent*) (this=0x7fffe0006eb0, ev=<optimized out>) at /usr/src/debug/dev-qt/qtgui-5.15.7-r1/qtbase-everywhere-src-5.15.7/src/gui/kernel/qwindow.cpp:2450
 #8  0x00007ffff49ee481 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x7fffe0006eb0, e=0x7fffffffd460) at /usr/src/debug/dev-qt/qtwidgets-5.15.7/qtbase-everywhere-src-5.15.7/src/widgets/kernel/qapplication.cpp:3637
 #9  0x00007ffff3e2d618 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x7fffe0006eb0, event=0x7fffffffd460) at /usr/src/debug/dev-qt/qtcore-5.15.7/qtbase-everywhere-src-5.15.7/src/corelib/kernel/qcoreapplication.cpp:1064
 #10 0x00007ffff43c8368 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) (e=0x55555f648b30) at /usr/src/debug/dev-qt/qtgui-5.15.7-r1/qtbase-everywhere-src-5.15.7/src/gui/kernel/qguiapplication.cpp:3261
 #11 0x00007ffff43a55ab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at /usr/src/debug/dev-qt/qtgui-5.15.7-r1/qtbase-everywhere-src-5.15.7/src/gui/kernel/qwindowsysteminterface.cpp:1169
 #12 0x00007fffef102622 in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/dev-qt/qtgui-5.15.7-r1/qtbase-everywhere-src-5.15.7/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:105
 #13 0x00007ffff386d030 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
 #14 0x00007ffff386d2d8 in  () at /usr/lib64/libglib-2.0.so.0
 #15 0x00007ffff386d36f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
 #16 0x00007ffff3e80e55 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5555596a4770, flags=...) at /usr/src/debug/dev-qt/qtcore-5.15.7/qtbase-everywhere-src-5.15.7/src/corelib/kernel/qeventdispatcher_glib.cpp:423
 #17 0x00007ffff3e2c00b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffd700, flags=..., flags@entry=...) at /usr/src/debug/dev-qt/qtcore-5.15.7/qtbase-everywhere-src-5.15.7/include/QtCore/../../src/corelib/global/qflags.h:69
 #18 0x00007ffff3e344ea in QCoreApplication::exec() () at /usr/src/debug/dev-qt/qtcore-5.15.7/qtbase-everywhere-src-5.15.7/include/QtCore/../../src/corelib/global/qflags.h:121
 #19 0x00005555594a5c43 in main(int, char**) (argc=2, argv=0x7fffffffdab8) at /home/nicolas/Dokumente/devel/open-source/nheko/src/main.cpp:401
(gdb) p w
$1 = (const QWidget *) 0x0
Lymkwi pushed a commit to Lymkwi/nheko that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants