@@ -124,10 +124,13 @@ def image(self, img):
124
124
)
125
125
# Grab all the pixels from the image, faster than getpixel.
126
126
pixels = img .convert ("1" ).load ()
127
+ auto_write = self .auto_write
128
+ self ._auto_write = False
127
129
# Iterate through the pixels
128
130
for x in range (self .columns ): # yes this double loop is slow,
129
131
for y in range (self .rows ): # but these displays are small!
130
132
self .pixel (x , y , pixels [(x , y )])
133
+ self ._auto_write = auto_write
131
134
if self ._auto_write :
132
135
self .show ()
133
136
@@ -214,6 +217,8 @@ def image(self, img):
214
217
)
215
218
# Grab all the pixels from the image, faster than getpixel.
216
219
pixels = img .convert ("RGB" ).load ()
220
+ auto_write = self .auto_write
221
+ self ._auto_write = False
217
222
# Iterate through the pixels
218
223
for x in range (self .columns ): # yes this double loop is slow,
219
224
for y in range (self .rows ): # but these displays are small!
@@ -226,5 +231,6 @@ def image(self, img):
226
231
else :
227
232
# Unknown color, default to LED off.
228
233
self .pixel (x , y , self .LED_OFF )
234
+ self ._auto_write = auto_write
229
235
if self ._auto_write :
230
236
self .show ()
0 commit comments