Skip to content

Conversation

@matthewverde
Copy link

mattg: edits to allow rpicam_file example to work on hard coded values, and draw image to a canvas

import tkinter
from tkinter import *

def getRGBHex(value, color):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function for setting hex value for the value received from raw file

def print_dimensions(rawFrame):
print(rawFrame.shape)
height, width = rawFrame.shape
for x in range(0, 1700): # width
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

draw the raw image to canvas

# pass camera reference into the converter.
r = RPICAM2DNG(camera)
r.options(path="", compress=True)
r.options(path="C:/Users/matth/code/PiDNG/raw-test-full-sensor", compress=False)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set working dir

r.options(path="C:/Users/matth/code/PiDNG/raw-test-full-sensor", compress=False)
r.filter = print_dimensions
r.convert(data, filename="output")
r.convert(data, filename="./full-sensor-test")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set output dng file name, dng file extension gets added by default

@@ -0,0 +1,18 @@
import subprocess
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this file for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant