Spaces:
Sleeping
Sleeping
Download combine_bitmaps.py from jk10978/bitmap-simulator: direct link, hf CLI and curl.
- Browser
- Download file 494 Bytes
-
https://huggingface.co/spaces/jk10978/bitmap-simulator/resolve/main/combine_bitmaps.py
- Command line
-
hf download hf://spaces/jk10978/bitmap-simulator/combine_bitmaps.py
-
curl -L -o combine_bitmaps.py https://huggingface.co/spaces/jk10978/bitmap-simulator/resolve/main/combine_bitmaps.py
494 Bytes
| from PIL import Image | |
| def combine_bitmaps(im1, im2): | |
| dst = Image.new("RGB", (im1.width + im2.width, im1.height)) | |
| dst.paste(im1, (0, 0)) | |
| dst.paste(im2, (im1.width, 0)) | |
| dst.save("tmp/combined_bitmap.bmp") | |
| """ | |
| # Open the original .bmp file | |
| linien_image = Image.open("assets/21.bmp") | |
| text_image = Image.open("output/font_output.bmp") | |
| # Combine the two images | |
| combined_bitmap = combine_bitmaps(linien_image, text_image) | |
| combined_bitmap.save("output/combined_output.bmp") | |
| """ | |