Skip to content

JPEG+RAW : Download ONLY jpeg file but save raw on memory card #156

Answered by Akinetopsia1
Akinetopsia1 asked this question in Q&A
Discussion options

You must be logged in to vote

using camera.trigger_capture() instead of camera.capture() did not give any file added event. With a bit of fiddling and better error logging i managed to do what i wanted the following way, thanks to another discussion i found on here

        #cleanup previous files
        test = os.listdir(ROOT_DIR + WORK_DIR)
        for item in test:
            if item.endswith(".jpg"):
                os.remove(os.path.join(ROOT_DIR + WORK_DIR, item))

        path = camera.capture(gp.GP_CAPTURE_IMAGE)
            
        #empty the event queue
        hasPreview = False
        typ,data = camera.wait_for_event(200)
        while typ != gp.GP_EVENT_TIMEOUT:

            if typ == gp.GP_EVENT_FILE_…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@jim-easterbrook
Comment options

@Akinetopsia1
Comment options

@jim-easterbrook
Comment options

@Akinetopsia1
Comment options

Answer selected by Akinetopsia1
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants