MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / image_memory_size

Function image_memory_size

utils/poster_eval_utils.py:196–199  ·  view source on GitHub ↗
(img: Image.Image, fmt="JPEG")

Source from the content-addressed store, hash-verified

194 return counts
195
196def image_memory_size(img: Image.Image, fmt="JPEG"):
197 buf = BytesIO()
198 img.save(buf, format=fmt)
199 return buf.tell()
200
201def truncate_images_to_fit(
202 images,

Callers 1

truncate_images_to_fitFunction · 0.70

Calls 1

saveMethod · 0.45

Tested by

no test coverage detected