first jenkins run

This commit is contained in:
2025-07-26 17:40:55 -07:00
parent a29ec39252
commit 7496df0174
8 changed files with 29 additions and 68 deletions

View File

@ -1,4 +1,11 @@
#!/bin/bash
# no need to do this math forever
input_width=1920
input_height=1080
output_width=1340
output_height=580
# Calculate the ratio for trimming the top part
trim_ratio=$(echo "scale=4; $output_height / $output_width * $input_width" | bc)
# this saves a snapshot of the camera every second or so depending on how long all the other crap takes
# let's hope the vars make it otherwise imma need to parse a bollocksing file
@ -26,12 +33,6 @@ do
# I have 1340x580. i think i will truncate the top
# Calculate the height to trim based on the aspect ratios of the input and output images
if (( $i % 5 == 0 )); then
input_width=1920
input_height=1080
output_width=1340
output_height=580
# Calculate the ratio for trimming the top part
trim_ratio=$(echo "scale=4; $output_height / $output_width * $input_width" | bc)
NOW=$(date +%Y%m%d%H%M%S)
convert $WORKING_DIR/$FILENAME.jpg -gravity North -crop x$trim_ratio +repage -resize 1340x580 {{ working_folder }}/small_thumbs/$NOW.jpg
fi