File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def _open(self) -> None:
54
54
width = i32 (self .fp .read (4 ))
55
55
height = i32 (self .fp .read (4 ))
56
56
color_depth = i32 (self .fp .read (4 ))
57
- if width <= 0 or height < = 0 :
57
+ if width == 0 or height = = 0 :
58
58
msg = "not a GIMP brush"
59
59
raise SyntaxError (msg )
60
60
if color_depth not in (1 , 4 ):
@@ -71,7 +71,7 @@ def _open(self) -> None:
71
71
raise SyntaxError (msg )
72
72
self .info ["spacing" ] = i32 (self .fp .read (4 ))
73
73
74
- comment = self .fp .read (comment_length )[:- 1 ]
74
+ self . info [ " comment" ] = self .fp .read (comment_length )[:- 1 ]
75
75
76
76
if color_depth == 1 :
77
77
self ._mode = "L"
@@ -80,8 +80,6 @@ def _open(self) -> None:
80
80
81
81
self ._size = width , height
82
82
83
- self .info ["comment" ] = comment
84
-
85
83
# Image might not be small
86
84
Image ._decompression_bomb_check (self .size )
87
85
You can’t perform that action at this time.
0 commit comments