Exemple #1
0
def slider():
    if request.method == "POST":
        data = request.get_json()
        print(data, "data")
        data = json_parse(data)
        for key in data:
            value = data[key]

            print(key, value)
            write_json('slider', key, value)
    return "nothing"
Exemple #2
0
def camera():
    if request.method == "POST":
        data = request.get_json()
        data = json_parse(data)
        for key in data:
            value = data[key]

            if key == 'eyedropper':
                x = value[0]
                y = value[1]
                CVProcessor.generate_eyedropper(x, y)

            write_json('camera', key, value)
    return jsonify({
        'hue': CVProcessor.hue,
        'saturation': CVProcessor.saturation,
        'value': CVProcessor.value
    })
Exemple #3
0
 def set_saturation(self, saturation):
     self.saturation = saturation
     write_json('dual_slider', 'saturation', saturation)
Exemple #4
0
 def set_value(self, value):
     self.value = value
     write_json('dual_slider', 'value', value)
Exemple #5
0
 def set_hue(self, hue):
     self.hue = hue
     write_json('dual_slider', 'hue', hue)