(w: int, h: int, color: str = "red")
| 33 | |
| 34 | |
| 35 | def _make_png_bytes(w: int, h: int, color: str = "red") -> bytes: |
| 36 | img = Image.new("RGB", (w, h), color=color) |
| 37 | buf = io.BytesIO() |
| 38 | img.save(buf, format="PNG") |
| 39 | return buf.getvalue() |
| 40 | |
| 41 | |
| 42 | def _make_jpeg_bytes(w: int, h: int, color: str = "blue", quality: int = 80) -> bytes: |
no test coverage detected