@@ -47,10 +47,6 @@ def wedge(self):
4747
4848 img = Image .merge ('RGB' , (r , g , b ))
4949
50- # print(("%d, %d -> "% (int(1.75*px),int(.25*px))) + \
51- # "(%s, %s, %s)"%img.getpixel((1.75*px, .25*px)))
52- # print(("%d, %d -> "% (int(.75*px),int(.25*px))) + \
53- # "(%s, %s, %s)"%img.getpixel((.75*px, .25*px)))
5450 return img
5551
5652 def to_xxx_colorsys (self , im , func , mode ):
@@ -95,32 +91,16 @@ def test_wedge(self):
9591 im = src .convert ('HSV' )
9692 comparable = self .to_hsv_colorsys (src )
9793
98- # print(im.getpixel((448, 64)))
99- # print(comparable.getpixel((448, 64)))
100-
101- # print(im.split()[0].histogram())
102- # print(comparable.split()[0].histogram())
103-
104- # im.split()[0].show()
105- # comparable.split()[0].show()
106-
10794 self .assert_image_similar (im .getchannel (0 ), comparable .getchannel (0 ),
10895 1 , "Hue conversion is wrong" )
10996 self .assert_image_similar (im .getchannel (1 ), comparable .getchannel (1 ),
11097 1 , "Saturation conversion is wrong" )
11198 self .assert_image_similar (im .getchannel (2 ), comparable .getchannel (2 ),
11299 1 , "Value conversion is wrong" )
113100
114- # print(im.getpixel((192, 64)))
115-
116101 comparable = src
117102 im = im .convert ('RGB' )
118103
119- # im.split()[0].show()
120- # comparable.split()[0].show()
121- # print(im.getpixel((192, 64)))
122- # print(comparable.getpixel((192, 64)))
123-
124104 self .assert_image_similar (im .getchannel (0 ), comparable .getchannel (0 ),
125105 3 , "R conversion is wrong" )
126106 self .assert_image_similar (im .getchannel (1 ), comparable .getchannel (1 ),
@@ -132,12 +112,6 @@ def test_convert(self):
132112 im = hopper ('RGB' ).convert ('HSV' )
133113 comparable = self .to_hsv_colorsys (hopper ('RGB' ))
134114
135- # print([ord(x) for x in im.split()[0].tobytes()[:80]])
136- # print([ord(x) for x in comparable.split()[0].tobytes()[:80]])
137-
138- # print(im.split()[0].histogram())
139- # print(comparable.split()[0].histogram())
140-
141115 self .assert_image_similar (im .getchannel (0 ), comparable .getchannel (0 ),
142116 1 , "Hue conversion is wrong" )
143117 self .assert_image_similar (im .getchannel (1 ), comparable .getchannel (1 ),
@@ -150,12 +124,6 @@ def test_hsv_to_rgb(self):
150124 converted = comparable .convert ('RGB' )
151125 comparable = self .to_rgb_colorsys (comparable )
152126
153- # print(converted.split()[1].histogram())
154- # print(target.split()[1].histogram())
155-
156- # print([ord(x) for x in target.split()[1].tobytes()[:80]])
157- # print([ord(x) for x in converted.split()[1].tobytes()[:80]])
158-
159127 self .assert_image_similar (converted .getchannel (0 ),
160128 comparable .getchannel (0 ),
161129 3 , "R conversion is wrong" )
0 commit comments