Printing a GBCamImage
Thanks to Raphael BOICHOT who works on a Game Boy Printer Paper Simulation, here’s an example of how looks a printed image
1from GameBEye.gbcamimage import gbcamimage
2from GameBEye.gbcamfilters import gbcamfilters
3import cv2
4
5# Path to the image
6image_filepath = "images\\originalImage.png"
7img = cv2.imread(image_filepath)
8
9# Creation of an GCCamImage object
10gb_img = gbcamimage.GBCamImage()
11# Reading of the file
12gb_img.read(image_filepath)
13
14# Displaying the original image
15original_title = "Original image with {} color palette".format(
16 gb_img.color_palette.name
17)
18cv2.imshow(original_title, gb_img.data)
19print("Original color palette : {}".format(gb_img.color_palette))
20
21printed_image = gbcamfilters.to_thermal_printer(gb_img)
22printed_title = "Printed image"
23cv2.imshow(printed_title, printed_image)
24
25
26cv2.waitKey()
27cv2.destroyWindow(original_title)
28cv2.destroyWindow(printed_title)
So from this input :
The output image is the following one :