kopia lustrzana https://github.com/projecthorus/wenet
Increase resize/overlay timeouts, switch to scale instead of resize
rodzic
eb073db8ed
commit
1f1d4db9a7
|
@ -269,7 +269,7 @@ class WenetPiCamera2(object):
|
|||
|
||||
# Resize image to the desired resolution.
|
||||
self.debug_message("Resizing image.")
|
||||
return_code = os.system("timeout -k 5 60 convert %s -resize %dx%d\! picam_temp.jpg" % (filename, self.tx_resolution[0], self.tx_resolution[1]))
|
||||
return_code = os.system("timeout -k 5 180 convert %s -scale %dx%d\! picam_temp.jpg" % (filename, self.tx_resolution[0], self.tx_resolution[1]))
|
||||
if return_code != 0:
|
||||
self.debug_message("Resize operation failed! (Possible kernel Oops? Maybe set arm_freq to 700 MHz)")
|
||||
return "FAIL"
|
||||
|
|
|
@ -175,7 +175,7 @@ def post_process_image(filename):
|
|||
gps_string = ""
|
||||
|
||||
# Build up our imagemagick 'convert' command line
|
||||
overlay_str = "timeout -k 5 60 convert %s -gamma 0.8 -font Helvetica -pointsize 40 -gravity North " % filename
|
||||
overlay_str = "timeout -k 5 180 convert %s -gamma 0.8 -font Helvetica -pointsize 40 -gravity North " % filename
|
||||
overlay_str += "-strokewidth 2 -stroke '#000C' -annotate +0+5 \"%s\" " % gps_string
|
||||
overlay_str += "-stroke none -fill white -annotate +0+5 \"%s\" " % gps_string
|
||||
# Add on logo overlay argument if we have been given one.
|
||||
|
|
Ładowanie…
Reference in New Issue