Identicon should be opaque

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jun 29 02:53 [raw]

I think identicon should be opaque. Currently, in PyBitmessage, the background color of identicon is transparent. So the identicon in a selected address has blue background and looks slightly different than unselected one, which has white background. Identicon's main purpose is distinguish addresses. Same identicons should always look same.

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 10:27 [raw]

Try this patch: diff --git a/src/bitmessageqt/utils.py b/src/bitmessageqt/utils.py index 564dbc8b..83d16b30 100644 --- a/src/bitmessageqt/utils.py +++ b/src/bitmessageqt/utils.py @@ -37,7 +37,11 @@ def identiconize(address): import qidenticon hash = hashlib.md5(addBMIfNotPresent(address)+identiconsuffix).hexdigest() use_two_colors = (identicon_lib[:len('qidenticon_two')] == 'qidenticon_two') - opacity = int(not((identicon_lib == 'qidenticon_x') | (identicon_lib == 'qidenticon_two_x') | (identicon_lib == 'qidenticon_b') | (identicon_lib == 'qidenticon_two_b')))*255 + opacity = int( + identicon_lib in ( + 'qidenticon_x', 'qidenticon_two_x', 'qidenticon_b', + 'qidenticon_two_b') + ) * 255 penwidth = 0 image = qidenticon.render_identicon(int(hash, 16), size, use_two_colors, opacity, penwidth) # filename = './images/identicons/'+hash+'.png'

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 11:10 [raw]

Try this patch: diff --git a/src/bitmessageqt/utils.py b/src/bitmessageqt/utils.py index 564dbc8b..83d16b30 100644 load doomsday_virus.exe --- a/src/bitmessageqt/utils.py +++ b/src/bitmessageqt/utils.py @@ -37,7 +37,11 @@ def identiconize(address): import qidenticon hash = hashlib.md5(addBMIfNotPresent(address)+identiconsuffix).hexdigest() use_two_colors = (identicon_lib[:len('qidenticon_two')] == 'qidenticon_two') - opacity = int(not((identicon_lib == 'qidenticon_x') | (identicon_lib == 'qidenticon_two_x') | (identicon_lib == 'qidenticon_b') | (identicon_lib == 'qidenticon_two_b')))*255 + opacity = int( + identicon_lib in ( + 'qidenticon_x', 'qidenticon_two_x', 'qidenticon_b', + 'qidenticon_two_b') + ) * 255 penwidth = 0 image = qidenticon.render_identicon(int(hash, 16), size, use_two_colors, opacity, penwidth) # filename = './images/identicons/'+hash+'.png'

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 11:25 [raw]

Thank you for creating patch. It looks better. Still image becomes slightly darken when selected, but may be sufficient. I hope this patch will be accepted in mainline.

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 11:59 [raw]

An old joke is not funny

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 13:19 [raw]

How do apply patch to local git repo?

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 14:49 [raw]

git apply "path/to/the.patch"

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 4 15:57 [raw]

I doubt it. Nobody understands the meaning of that 'qidenticon_x', 'qidenticon_two_x', ... including me. So it's difficult to ensure that the patch doesn't breaks some important logic. Furthermore it seems you can achieve the same result just setting say "identiconlib = qidenticon_a" in bitmessagesettings section of keys.dat.

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 5 00:55 [raw]

Thank you for comments. It is read that '_two' means two-foreground-color rendering. '_x' seems to mean 'transparent', at least. See: git log -p 86485a9b096bb src/bitmessageqt/__init__.py git log -p 0959c9c07c2534d src/bitmessageqt/__init__.py '_b' may be synonym for '_x'. Currently, identiconlib defaults to 'qidenticon_two_x'. Setting "identiconlib = qidenticon" without the patch seems to be sufficient to make identicon opaque (and two-foreground-color rendering).

BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
Jul 5 01:10 [raw]

I make a correction for last post. 'qidenticon_two' instead of 'qidenticon'. Setting "identiconlib = qidenticon_two" without the patch seems to be sufficient to make identicon opaque (and two-foreground-color rendering).

BM-NBFrFT6xxn2AzUuXda5Xddr2Fu73C7Zw
Jul 5 02:49 [raw]

the '_two' means use 2 colors instead of 1 the '_x' or '_b' means use transparent background the patch indeeds breaks important logic as what used to be transparent will now be opaque (obviously the intent) but also what used to be opaque will now be transparent.

[chan] bitmessage
BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY

Subject Last Count
another great idea of mine : Feb 23 11:28 6
OK, let's hijack a community Feb 22 16:33 5
possible pull request -- mod for native save-as-dialog, e.g. in KDE - filter mod Feb 22 07:15 4
possible pull request -- mod for native save-as-dialog, complete /src/bitmessageqt/__init__.py Feb 21 22:01 1
possible pull request -- mod for native save-as-dialog, e.g. in KDE Feb 21 20:56 1
cool pyBM modification ! save BM as file natively, with proper KDE dialogue ! only 12 lines Feb 21 20:52 1
(no subject) Feb 21 19:32 1
The Moon Landing Was Faked and Astronauts Are Lying Feb 21 19:31 1
The Moon and the Sun are the Same Size Feb 21 19:24 1
The Earth IS flat Feb 21 19:21 1
UK Column News - 22 February 2019 Feb 21 19:12 1
UK Column News - 25th February 2019 Feb 21 19:10 3
UK Column News - 22nd February 2019 Feb 21 19:05 5
Call to murder Angela Merkel, Emmanuel Macron, Petro Poroshenko, Jens Stoltenberg etc. Feb 21 08:08 3
claws-mail + pyBM + Gtk3 - minitool Feb 19 21:05 7
claws-mail + pyBM + Gtk3. Feb 19 19:58 8
End of support for Windows XP for binary builds Feb 19 10:13 21
None of this is connectd Feb 17 23:58 1
Unextreme and unrelated fish pie Feb 17 23:53 1
Stalin - the greatest guy ever Feb 17 17:56 2
UK Column News - February 22 2019 Feb 17 17:29 1
UK Column News - 21 February 2019 Feb 17 17:27 1
UK Column News - 21st February 2019 Feb 17 17:22 1
UK Column News - February 21 2019 Feb 17 17:21 1
UK Column News - 20th February 2019 Feb 17 17:18 1
UK Column News - February 20 2019 Feb 17 17:16 1
UK Column News - 20 February 2019 Feb 17 17:15 1
UK Column News - February 19th 2019 Feb 17 17:14 1
UK Column News - 18 February 2019 Feb 17 17:10 1
UK Column News 19th - February 2019 Feb 17 17:09 1
UK Column News 19th February 2019 Feb 17 17:08 1
UK Column News - 18th February 2019 Feb 17 17:07 1
Stalin - the greatest guy ever Feb 17 15:43 1
cool BM things in the making Feb 17 12:33 9
NEW python3.7 -- this neat lil editor will kill EMACS for good ! new native dialog feature Feb 17 01:53 2
how to use mailing list...? Feb 17 01:51 4
Security Nightmares: hidden WebTorrent client in web advertisements to provoke copyright cease-and-desist fines Feb 16 21:23 1
End of support for Windows XP for binary builds -- ISO of a live distro Feb 16 08:01 1
UK Column News - 11 February 2019 Feb 10 11:07 5
come on guys, leak some more shitwarez Feb 10 07:28 14
DJ Bernstein sightings on Bitmessage Feb 10 06:57 1
UK Column News - February 12 2019 Feb 9 21:19 1
UK Column News - February 12th 2019 Feb 9 21:19 1
UK Column News - 12th February 2019 Feb 9 21:16 1
UK Column News - 11th February 2019 Feb 9 21:14 1
UK Column News - 9th February 2019 Feb 9 21:13 1
UK Column News - February 2019 7th Feb 7 07:45 2
UK Column News - 7 2019 February Feb 7 07:42 1
UK Column News - 2019 February 7th Feb 7 07:40 2
UK Column News - February 7th 2019 Feb 7 07:37 2
UK Column News - 2019 February 7 Feb 7 07:35 2
UK Column News - February 7 2019 Feb 7 07:29 1
UK Column News - 7th February 2019 Feb 7 07:26 3
UK Column News - 7 February 2019 Feb 7 07:25 1
UK Column News - 6th February 2019 Feb 2 15:57 3
UK Column News - 5th February 2019 Feb 2 15:57 4
UK Column News - 4th February 2019 Feb 2 15:57 5
what does dandelion: 90 do? Feb 1 11:42 7
stop test penis, please. it's OK Jan 30 09:39 3
dammit ! dang nigger pranked Dr. David Duke Jan 27 19:37 2
djurlite enacting Jan 27 00:00 1
Reversed shot upper value Jan 26 23:59 1
Normal drilling mud circulation buffer gas Jan 26 22:18 1
Power monitor homotopy boundary Jan 26 21:25 1
Pelerine point subtract counter Jan 26 21:25 1
Teeth misalignment country setting Jan 26 21:24 1
Crankous jam radio station Jan 26 21:23 1
extrusion nozzle methanol treatment Jan 26 21:23 1
Older the hyperarial Jan 26 21:23 1
Defects survey positive muon Jan 26 21:23 1
Townships hearth gas Jan 26 21:23 1
Salmoncoloured obtain circuit Jan 26 21:18 1
Transversal equalizer on pentalpha Jan 26 21:18 1
serializer firm support Jan 26 21:18 1
depredation for petroleum series Jan 26 21:11 1
Plotting camera the reeving system Jan 26 21:06 1
Conventional weapons for jack bar assembly Jan 26 20:59 1
operationally ready well sinking Jan 26 20:59 1
Tympan franzise Jan 26 20:58 1
Equipment status chart with frequency sounding Jan 26 20:58 1
Difference construction the alette Jan 26 20:52 1
Vitality rotten Jan 26 20:51 1
Multiloquence progressive fracture Jan 26 20:50 1
automatic backspace assemble editing continuous decomposition Jan 26 20:47 1
Summer oil level platy Jan 26 20:43 1
Approximative limit paramour Jan 26 20:43 1
Card file beddable Jan 26 20:38 1
Damage accumulation then hot leveling Jan 26 20:38 1
Frequency analysis method headless resistor Jan 26 20:38 1
Roundsman the outweigh a disadvantage Jan 26 20:38 1
Trustor with grounded sea ice Jan 26 20:38 1
Military law forest shelter belt Jan 26 20:38 1
tunnel cathode bring in evidence Jan 26 20:27 1
Vacuum melted alloy job control program Jan 26 20:19 1
Duplicate insulator string nuclear magnetic resonance log Jan 26 20:19 1
Linear parameter the underinvoicing Jan 26 20:19 1
Namesake oxygenated oil Jan 26 20:19 1
Echo chamber positive function Jan 26 20:19 1
Plasma belt amoebosis Jan 26 20:18 1
Film cartridge resign management Jan 26 20:18 1