Lines Matching full:height
58 @return: A 3 element tuple containing the width, height and data of the
72 def image_write_to_ppm_file(filename, width, height, data): argument
74 Write a PPM image with the given width, height and data.
78 @param height: PPM file height (pixels)
82 fout.write("%d %d\n" % (width, height))
88 def image_crop(width, height, data, x1, y1, dx, dy): argument
93 @param height: Original image height
98 @param dy: Desired height of the cropped region
99 @return: A 3-tuple containing the width, height and data of the
103 if y1 > height - 1: y1 = height - 1
105 if dy > height - y1: dy = height - y1
114 def image_md5sum(width, height, data): argument
119 @param height: PPM file height
122 header = "P6\n%d %d\n255\n" % (width, height)
128 def get_region_md5sum(width, height, data, x1, y1, dx, dy, argument
134 @param height: Original image height
139 @param dy: Desired height of the cropped region
143 (cw, ch, cdata) = image_crop(width, height, data, x1, y1, dx, dy)
162 (width, height) = map(int, fin.readline().split())
163 assert(width > 0 and height > 0)
167 assert(size - size_read == width*height*3)
173 def image_comparison(width, height, data1, data2): argument
178 @param height: Height of both images
181 @return: A 3-element tuple containing the width, height and data of the
188 while i < width*height*3:
210 return (width, height, newdata)
213 def image_fuzzy_compare(width, height, data1, data2): argument
218 @param height: Height of both images
228 while i < width*height*3: