mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-15 02:06:01 +08:00
Revert "rembg b - return a stream of RGB24 instead of a mess of consecutive pngs"
This commit is contained in:
parent
1f98d03b95
commit
b9634aaf7e
@ -135,7 +135,9 @@ def b_command(
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
def img_to_byte_array(img: PILImage) -> bytes:
|
||||
return img.convert('RGB').tobytes("raw", "RGB")
|
||||
buff = io.BytesIO()
|
||||
img.save(buff, format="PNG")
|
||||
return buff.getvalue()
|
||||
|
||||
async def connect_stdin_stdout():
|
||||
loop = asyncio.get_event_loop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user