commit dca4069dbd424aa0140075b6986225faf407a9e8
parent 59de7de4928e069247caaccf2a4968b747e1bc51
Author: rob <rob@tarina.org>
Date: Thu, 23 Nov 2023 16:47:01 +0000
added special effects negative and solarized
Diffstat:
4 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/gonzopi.py b/gonzopi.py
@@ -89,8 +89,8 @@ def main():
gonzopifolder = os.getcwd()
#MENUS
- standardmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'UPDATE', 'UPLOAD', 'BACKUP', 'LOAD', 'NEW', 'TITLE', 'LIVE:'
- gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'New SCENE', 'Sync SCENE'
+ standardmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'SFX:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'UPDATE', 'UPLOAD', 'BACKUP', 'LOAD', 'NEW', 'TITLE', 'LIVE:'
+ gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'SFX:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'New SCENE', 'Sync SCENE'
#gonzopictrlmenu = "BACK","CAMERA:", "Add CAMERA","New FILM","","New SCENE","Sync SCENE","Snapshot"
emptymenu='','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''
menu = standardmenu
@@ -106,6 +106,8 @@ def main():
awb = 'auto', 'sunlight', 'cloudy', 'shade', 'tungsten', 'fluorescent', 'incandescent', 'flash', 'horizon'
awbx = 0
awb_lock = 'no'
+ effects = 'none', 'negative', 'solarize'
+ effectselected = 0
cammode = 'film'
camera_model=''
fps = 25
@@ -1302,6 +1304,10 @@ def main():
camera.contrast = min(camera.contrast + 1, 99)
elif menu[selected] == 'SAT:':
camera.saturation = min(camera.saturation + 1, 99)
+ elif menu[selected] == 'SFX:':
+ if effectselected < len(effects) - 1:
+ effectselected += 1
+ camera.image_effect = effects[effectselected]
elif menu[selected] == 'SHUTTER:':
if camera.shutter_speed == 0:
camera.shutter_speed = camera.exposure_speed
@@ -1462,6 +1468,10 @@ def main():
camera.contrast = max(camera.contrast - 1, -100)
elif menu[selected] == 'SAT:':
camera.saturation = max(camera.saturation - 1, -100)
+ elif menu[selected] == 'SFX:':
+ if effectselected > 0:
+ effectselected -= 1
+ camera.image_effect = effects[effectselected]
elif menu[selected] == 'SHUTTER:':
if camera.shutter_speed == 0:
camera.shutter_speed = camera.exposure_speed
@@ -1738,12 +1748,12 @@ def main():
lastmenu = menu[selected]
if showgonzopictrl == False:
menu = standardmenu
- settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live
+ settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, '', '', '', '', '', '', live
else:
#gonzopictrlmenu = 'FILM:', 'SCENE:', 'SHOT:', 'TAKE:', '', 'SHUTTER:', 'ISO:', 'RED:', 'BLUE:', 'FPS:', 'Q:', 'BRIGHT:', 'CONT:', 'SAT:', 'FLIP:', 'BEEP:', 'LENGTH:', 'HW:', 'CH:', 'MIC:', 'PHONES:', 'COMP:', 'TIMELAPSE', 'MODE:', 'DSK:', 'SHUTDOWN', 'SRV:', 'SEARCH:', 'WIFI:', 'CAMERA:', 'Add CAMERA', 'New FILM', 'Sync FILM', 'Sync SCENE'
menu = gonzopictrlmenu
#settings = '',str(camselected),'','',rectime,'','','','','','','','','',''
- settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', ''
+ settings = filmname, str(scene) + '/' + str(scenes), str(shot) + '/' + str(shots), str(take) + '/' + str(takes), rectime, camerashutter, cameraiso, camerared, camerablue, str(round(camera.framerate)), str(quality), str(camera.brightness), str(camera.contrast), str(camera.saturation), effects[effectselected], str(flip), str(beeps), str(reclenght), str(plughw), str(channels), str(miclevel), str(headphoneslevel), str(comp), '', cammode, diskleft, '', serverstate, searchforcameras, wifistate, str(camselected), '', '', '', '', '', ''
#Rerender menu if picamera settings change
#if settings != oldsettings or selected != oldselected:
writemenu(menu,settings,selected,'',showmenu)
diff --git a/gui/Makefile.include b/gui/Makefile.include
@@ -1,9 +1,9 @@
CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi
-LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/ilclient -L$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/vgfont
+LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/home/pi/gonzopi/gui/libs/ilclient -L$(SDKSTAGE)/home/pi/gonzopi/gui/libs/vgfont
-INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/ilclient -I$(SDKSTAGE)/home/pi/tarinaretake/gui/libs/vgfont
+INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/home/pi/gonzopi/gui/libs/ilclient -I$(SDKSTAGE)/home/pi/gonzopi/gui/libs/vgfont
all: $(BIN) $(LIB)
diff --git a/gui/src/main.c b/gui/src/main.c
@@ -260,15 +260,15 @@ int main(void)
render_subtitle(img, line, text_size, text_size_selected, row2, y_offset3, color);
row2 += read * space + morespace;
}
- if (linenr >= 13+menuadd && linenr <= 20+menuadd){
+ if (linenr >= 13+menuadd && linenr <= 19+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row3, y_offset4, color);
row3 += read * space + morespace;
}
- if (linenr >= 21+menuadd && linenr <= 27+menuadd){
+ if (linenr >= 20+menuadd && linenr <= 28+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row4, y_offset5, color);
row4 += read * space + morespace;
}
- if (linenr >= 28+menuadd && linenr <= 40+menuadd){
+ if (linenr >= 29+menuadd && linenr <= 40+menuadd){
render_subtitle(img, line, text_size, text_size_selected, row5, y_offset6, color);
row5 += read * space + morespace;
}
diff --git a/gui/tarinagui.bin b/gui/tarinagui.bin
Binary files differ.