Skip to content

Commit a77184a

Browse files
committed
Update version to 1.5.2
1 parent 2e525f8 commit a77184a

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

HISTORY.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
History
33
=======
44

5+
1.5.2 (2017-10-24)
6+
------------------
7+
8+
* Assig different colors to different lablels
9+
10+
1.5.1 (2017-9-27)
11+
------------------
12+
13+
* Show a autosaving dialog
14+
515
1.5.0 (2017-9-14)
616
------------------
717

libs/lib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from math import sqrt
2+
from libs.ustr import ustr
23
import hashlib
34
try:
45
from PyQt5.QtGui import *
@@ -74,7 +75,8 @@ def fmtShortcut(text):
7475

7576

7677
def generateColorByText(text):
77-
hashCode = hash(text)
78+
s = str(ustr(text))
79+
hashCode = int(hashlib.sha256(s.encode('utf-8')).hexdigest(), 16)
7880
r = int((hashCode / 255) % 255)
7981
g = int((hashCode / 65025) % 255)
8082
b = int((hashCode / 16581375) % 255)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.5.1
2+
current_version = 1.5.2
33
commit = True
44
tag = True
55

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
setup(
2020
name='labelImg',
21-
version='1.5.1',
21+
version='1.5.2',
2222
description="LabelImg is a graphical image annotation tool and label object bounding boxes in images",
2323
long_description=readme + '\n\n' + history,
2424
author="TzuTa Lin",

0 commit comments

Comments
 (0)