Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview Image too "zoomed in" #533

Open
fatgeek opened this issue Oct 31, 2023 · 0 comments
Open

Preview Image too "zoomed in" #533

fatgeek opened this issue Oct 31, 2023 · 0 comments
Labels

Comments

@fatgeek
Copy link

fatgeek commented Oct 31, 2023

Describe the bug
Give a clear and concise description of what the bug is.

Steps to reproduce the bug

  1. Get ready to take a picture
  2. The preview image is too zoomed in to give an accurate representation of how the image is going to look. It shows a tiny area of the final picture output.

Logs

/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: Your system is neon capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.
  return f(*args, **kwds)
pygame 2.5.2 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
pygame-menu 4.0.7
[ INFO    ] pibooth           : Installed plugins: 
[ INFO    ] pibooth           : Starting the photo booth application on Raspberry pi 4B
[ INFO    ] pibooth           : Configuring Picamera camera ...
[ WARNING ] pibooth           : No printer named '' in CUPS (see http://localhost:631)
[ DEBUG   ] pibooth           : +< Activate state 'wait'
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 41 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 41 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 59 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 80 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 80 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iTXt' 99 29
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 140 5756
[ DEBUG   ] pibooth           : |  BUTTONDOWN: generate CAPTURE button event
[ DEBUG   ] pibooth           : +> took 5.940 seconds
[ DEBUG   ] pibooth           : +< Activate state 'choose'
[ INFO    ] pibooth           : |  Show picture choice (nothing selected)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 41 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 41 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 59 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 80 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 80 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iTXt' 99 29
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 140 5756
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 41 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 41 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 59 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 80 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 80 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iTXt' 99 29
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 140 5756
[ DEBUG   ] pibooth           : |  BUTTONDOWN: generate PRINTER event
[ DEBUG   ] pibooth           : +> took 1.713 seconds
[ DEBUG   ] pibooth           : +< Activate state 'chosen'
[ INFO    ] pibooth           : |  Show picture choice (1 captures selected)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ DEBUG   ] pibooth           : +> took 4.207 seconds
[ DEBUG   ] pibooth           : +< Activate state 'preview'
[ INFO    ] pibooth           : |  Show preview before next capture
[ DEBUG   ] pibooth           : |  No translation defined for 'en/capture' key
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 5653
[ DEBUG   ] pibooth           : +> took 4.308 seconds
[ DEBUG   ] pibooth           : +< Activate state 'capture'
[ INFO    ] pibooth           : |  Take a capture
[ DEBUG   ] pibooth           : +> took 0.990 seconds
[ DEBUG   ] pibooth           : +< Activate state 'processing'
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ INFO    ] pibooth           : |  Saving raw captures
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: ImageWidth (256) - type: long (4) - value: b'\x00\x00\x07\x80'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: ImageLength (257) - type: long (4) - value: b'\x00\x00\x048'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: Make (271) - type: string (2) Tag Location: 46 - Data Location: 134 - value: b'RaspberryPi\x00'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: Model (272) - type: string (2) Tag Location: 58 - Data Location: 146 - value: b'RP_imx219\x00'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: XResolution (282) - type: rational (5) Tag Location: 70 - Data Location: 156 - value: b'\x00\x00\x00H\x00\x00\x00\x01'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: YResolution (283) - type: rational (5) Tag Location: 82 - Data Location: 164 - value: b'\x00\x00\x00H\x00\x00\x00\x01'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: ResolutionUnit (296) - type: short (3) - value: b'\x00\x02'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: DateTime (306) - type: string (2) Tag Location: 106 - Data Location: 172 - value: b'2023:10:30 21:09:43\x00'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: YCbCrPositioning (531) - type: short (3) - value: b'\x00\x01'
[ DEBUG   ] PIL.TiffImagePlugin: |  tag: ExifIFD (34665) - type: long (4) - value: b'\x00\x00\x00\xc0'
[ INFO    ] pibooth           : |  Creating the final picture
[ INFO    ] pibooth           : |  Use OpenCvPictureFactory to create background
[ INFO    ] pibooth           : |  Use OpenCvPictureFactory to concatenate images
[ INFO    ] pibooth           : |  Use OpenCvPictureFactory to assemble final image
[ INFO    ] pibooth           : |  Use OpenCvPictureFactory to draw texts
[ INFO    ] pibooth           : |  Use OpenCvPictureFactory to outline boundary borders
[ INFO    ] pibooth           : |  Save image '/home/fatgeek/Pictures/pibooth/2023-10-30-21-09-39_pibooth.jpg'
[ DEBUG   ] pibooth           : +> took 1.596 seconds
[ DEBUG   ] pibooth           : +< Activate state 'finish'
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 4879
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IHDR' 16 13
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'iCCP' 41 388
[ DEBUG   ] PIL.PngImagePlugin: |  iCCP profile name b'ICC profile'
[ DEBUG   ] PIL.PngImagePlugin: |  Compression method 0
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'bKGD' 441 6
[ DEBUG   ] PIL.PngImagePlugin: |  b'bKGD' 441 6 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'pHYs' 459 9
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tIME' 480 7
[ DEBUG   ] PIL.PngImagePlugin: |  b'tIME' 480 7 (unknown)
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'tEXt' 499 25
[ DEBUG   ] PIL.PngImagePlugin: |  STREAM b'IDAT' 536 8192
[ DEBUG   ] pibooth           : +> took 1.251 seconds
[ DEBUG   ] pibooth           : +< Activate state 'wait'
[ DEBUG   ] pibooth           : |  Add to buffer the image '2128288592'

Environment

  • OS [e.g. Raspbian Buster] Buster
  • Camera [e.g. Rpi camera + Nikon D90] PiCam 2.1
  • Pibooth version [e.g. 1.1.2] 2.5.2

pibooth.cfg:

[GENERAL]
# User interface language: 'br', 'de', 'dk', 'en', 'es', 'fr', 'hu', 'it', 'nl', 'no' or 'pt'
language = en

# Path to save pictures (list of quoted paths accepted)
directory = ~/Pictures/pibooth

# Start pibooth at Raspberry Pi startup
autostart = True

# How long to wait in seconds before start pibooth at Raspberry Pi startup
autostart_delay = 0

# In debug mode, exceptions are not caught, logs are more verbose, pictures are cleared at startup
debug = False

# Path to custom plugin(s) not installed with pip (list of quoted paths accepted)
plugins =

# Plugin names to be disabled after startup (list of quoted names accepted)
plugins_disabled = printer

# Enable a virtual keyboard in the settings interface
vkeyboard = False

[WINDOW]
# The (width, height) of the display window or 'fullscreen'
#size = (800, 480)
size = fullscreen

# Background RGB color or image path
background = (0, 0, 0)

# Font name or file path used for app texts
font = Amatic-Bold

# Text RGB color
text_color = (255, 255, 255)

# Blinking background when a capture is taken
flash = True

# Animate the last taken picture by displaying captures one by one
animate = False

# How long is displayed the capture in seconds before switching to the next one
animate_delay = 0.2

# On 'finish' state: how long is displayed the final picture in seconds (0 if never shown)
finish_picture_delay = 0

# On 'wait' state: how long is displayed the final picture in seconds before being hidden (-1 if never hidden)
wait_picture_delay = -1

# How long is displayed the 'chosen' state:  (0 if never shown)
chosen_delay = 4

# Show arrows to indicate physical buttons: 'bottom', 'top', 'hidden' or 'touchscreen'
arrows = bottom

# Apply horizontal offset to arrows position
arrows_x_offset = -200

# How long is the preview in seconds
preview_delay = 3

# Show a countdown timer during the preview
preview_countdown = True

# Stop the preview before taking the capture
preview_stop_on_capture = False

[PICTURE]
# Orientation of the final picture: 'auto', 'portrait' or 'landscape'
orientation = auto

# Possible choice(s) of captures numbers (numbers between 1 to 4)
captures = (4, 1)

# Effect applied to the captures (list of quoted names accepted)
captures_effects = none

# Crop each capture border in order to fit the paper size
captures_cropping = False

# Thick (in pixels) between captures and picture borders/texts
margin_thick = 50

# Main text displayed
footer_text1 = Photo Booth

# Secondary text displayed
footer_text2 = 2023

# RGB colors used for footer texts (list of tuples accepted)
text_colors = (0, 0, 0)

# Fonts name or file path used for footer texts (list of quoted names accepted)
text_fonts = ('Amatic-Bold', 'AmaticSC-Regular')

# Alignments used for footer texts: 'left', 'center' or 'right' (list of quoted names accepted)
text_alignments = center

# Overlay path (PNG file) with same aspect ratio than final picture (list of quoted paths accepted)
overlays =

# Background RGB color or image path (list of tuples or quoted paths accepted)
backgrounds = (255, 255, 255)

[CAMERA]
# Adjust ISO for lighting issues, can be different for preview and capture (list of integers accepted)
iso = 100

# Flip horizontally the capture
flip = False

# Rotation of the camera: 0, 90, 180 or 270, can be different for preview and capture (list of integers accepted)
rotation = 0

# Resolution for camera captures (preview will have same aspect ratio)
#resolution = (3200, 1800)
resolution = (1920, 1080)

# Delete captures from camera internal memory (when applicable)
delete_internal_memory = False

[PRINTER]
# Name of the printer defined in CUPS (or use the 'default' one)
printer_name =

# Print options passed to the printer, shall be a valid Python dictionary
printer_options = {}

# How long is the print view in seconds (0 to skip it)
printer_delay = 10

# Number of pages automatically sent to the printer (or use 'max' to reach max duplicate)
auto_print = 0

# Maximum number of printed pages before warning on paper/ink levels (-1 = infinite)
max_pages = -1

# Maximum number of duplicate pages sent to the printer (avoid paper waste)
max_duplicates = 3

# Print 1, 2, 3 or 4 picture copies per page
pictures_per_page = 1

[CONTROLS]
# How long to press a single hardware button in seconds
debounce_delay = 0.3

# How long to press multiple hardware buttons in seconds
multi_press_delay = 0.5

# Physical GPIO IN pin to take a picture
picture_btn_pin = 11

# Physical GPIO OUT pin to light a LED when picture button is pressed
picture_led_pin = 7

# Physical GPIO IN pin to print a picture
print_btn_pin = 13

# Physical GPIO OUT pin to light a LED when print button is pressed
print_led_pin = 15
@fatgeek fatgeek added the bug label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant