@@ -77,8 +77,6 @@ def test(jpeg_input, scale, fill=0xFFFF, **position_and_crop):
7777
7878 decoder .decode (b , scale = scale , ** position_and_crop )
7979
80- dump_bitmap (b )
81-
8280 if position_and_crop :
8381 position_and_crop .setdefault ("x" , 0 )
8482 position_and_crop .setdefault ("y" , 0 )
@@ -89,6 +87,10 @@ def test(jpeg_input, scale, fill=0xFFFF, **position_and_crop):
8987 refb .fill (fill )
9088 bitmaptools .blit (refb , full , ** position_and_crop )
9189 print (f"{ memoryview (refb ) == memoryview (b )= } " )
90+ if not memoryview (refb ) == memoryview (b ):
91+ dump_bitmap (b )
92+ else :
93+ dump_bitmap (b )
9294
9395
9496class IOAdapter (io .IOBase ):
@@ -121,10 +123,10 @@ def readinto(self, buf):
121123test (io .BytesIO (content ), scale = 3 )
122124
123125print ("crop & move" )
124- test (content , scale = 3 , x = 8 , y = 8 )
125- test (content , scale = 3 , x1 = 8 , y1 = 8 )
126+ test (content , scale = 3 , x = 8 , y = 12 )
127+ test (content , scale = 3 , x1 = 8 , y1 = 12 )
126128test (content , scale = 3 , x2 = 16 , y2 = 16 )
127- test (content , scale = 3 , x = 12 , y = 12 , x1 = 8 , y1 = 12 , x2 = 16 , y2 = 16 )
129+ test (content , scale = 3 , x = 12 , y = 16 , x1 = 8 , y1 = 12 , x2 = 16 , y2 = 16 )
128130
129131print ("color key" )
130132test (content , scale = 0 , skip_source_index = 0x4529 , fill = 0 )
0 commit comments