@@ -139,9 +139,7 @@ def image(self, img: Image) -> None:
139
139
imwidth , imheight = img .size
140
140
if imwidth != self .columns or imheight != self .rows :
141
141
raise ValueError (
142
- "Image must be same dimensions as display ({0}x{1})." .format (
143
- self .columns , self .rows
144
- )
142
+ f"Image must be same dimensions as display ({ self .columns } x{ self .rows } )."
145
143
)
146
144
# Grab all the pixels from the image, faster than getpixel.
147
145
pixels = img .convert ("1" ).load ()
@@ -259,8 +257,8 @@ def fill(self, color: int) -> None:
259
257
fill1 = 0xFF if color & 0x01 else 0x00
260
258
fill2 = 0xFF if color & 0x02 else 0x00
261
259
for i in range (8 ):
262
- self ._set_buffer (i * 2 , fill1 )
263
- self ._set_buffer (i * 2 + 1 , fill2 )
260
+ self ._set_buffer (i * 2 + 1 , fill1 )
261
+ self ._set_buffer (i * 2 , fill2 )
264
262
if self ._auto_write :
265
263
self .show ()
266
264
@@ -274,9 +272,7 @@ def image(self, img: Image) -> None:
274
272
imwidth , imheight = img .size
275
273
if imwidth != self .columns or imheight != self .rows :
276
274
raise ValueError (
277
- "Image must be same dimensions as display ({0}x{1})." .format (
278
- self .columns , self .rows
279
- )
275
+ f"Image must be same dimensions as display ({ self .columns } x{ self .rows } )."
280
276
)
281
277
# Grab all the pixels from the image, faster than getpixel.
282
278
pixels = img .convert ("RGB" ).load ()
0 commit comments