Export Raw to jpeg, import jpeg, delete raw. Workflow optimization?

Hey there,

i’m looking for ways to better my workflow regarding unwanted raws. I have thousands of raws that i don’t want to keep as raws anymore, only as 5MP jpegs.

What i do currently is described below, assume i want to delete unwanted raws in folder 2010:

  1. Filter for photos in folder 2010 ending with .cr2
  2. Mark unwanted photos in specified color, lets say purple
  3. Filter for photos with color lable purple
  4. Export as jpegs in same folder as raws with (FILE_FOLDER)/(FILE_NAME) as target storage
  5. Import whole folder 2010, newly created jpegs are imported
  6. Filter again for marked photos ending with .cr2 in folder 2010
  7. Delete marked photos.

Now what would be nice to have is an automated import to skip step 7. Is there a way to accomplish that?
What would be really nice to have is a export feature that does steps 4 to 7. Is there already something like that?

Do you have a similar workflow?

If you can use darktable-cli (command line interface) instead of its gui version you could write a shell script that 1. Exports specified raws as jpegs 2. Deletes source files (or a safer way would be to move them to a specified folder instead). Then you would add the script to “open with” menu and then you would right click on the purple raw files- open with - your script.sh. If you go this route please don’t forget to add a command that removes the raws from darktable database before removing files physically otherwise you will end up having those ugly black/white skull thumbnails

1 Like

@matejmarti I normally keep the raws in case I want to go back to them in the future. I would just toss the ones that aren’t good in quality or forgettable. As for jpgs, are these from the camera, or post-processed from the raws? If it is the former, then I would personally keep the sidecar from the raw processor and not bother with the jpg export.

One way to ameliorate raw file size is to delete the embedded images. Usually, raw files contain more than one, which would clog up your hard drive. If you have thousands of raws, you would definitely save a lot of space by remove some of these images.

Is this possible ? I thought about this awhile ago and was not able to find anything useful on the web besides extracting an embedded JPEG from a raw. When I did it using exiftool I was disappointed to see that the embedded preview is only few kilobytes so I did not bother. Did I miss anything ?

Some raw files have even 3 embedded JPEG images. @Andrius you probably extracted the thumbnail, not the preview - two different things, and there could be more than one of each. Having said that, deleting anything from inside of a raw file is not a great idea.

2 Likes

Don’t do that.

@Andrius In terms of savings, it would depend on the raw file. One from my aging low end camera would have 1-2 MB in embedded images. Online, I found one with 6 MB. Multiply that by the thousands…

It is possible to delete embedded images with exiftool. Do

exiftool -list FILENAME | grep Binary
exiftool -PreviewImage= -P *.EXTENSION

In Windows, use find instead of grep

exiftool -list FILENAME | find "Binary"
  • Use grep or find to discover the tag names of the embedded images.
  • Use -tag= to remove the tag or data. There may be multiple removals per raw.
  • There is a restriction on -ThumbnailImage; it cannot be removed.
  • The default behavior of exiftool is to append a suffix to the originals.
  • -P means “preserve file modification date/time”.

I agree that it is something that should not be done unless the user knows what he or she is doing. Some apps have specific uses for the embedded images and metadata attached to them.

For normal TIFF’s, JPEG’s, etc - sure.
For raws (even DNG) - nope. It’s one of these cases of giving user, which is standing on the stool, a rope, that is already tied to the ceiling. The only thing he can do with that is hang himself, most likely even without realizing it.
This is not a joke, this is really serious.

I have the feeling that we went off topic :slight_smile: . I won’t delete embedded jpegs.

As for the first reply by Andrius, the CLI method seems too complicated for me the at the moment. I’ll stick with my current workflow for now to delete old unneeded raws.

@LebedevRI The imagery in your response weighs heavy on my heart. I take your words very seriously. If I offended you in any way, that was not my intention.

@matejmarti Yes, sorry about the detour. I haven’t used darktable in a long time but these are the steps that I would take, if I understand your currently workflow properly:

  1. Filter *.CR2 files in 2010 and mark them.
  2. Export JPGs from these CR2s into the same folder.
  3. Filter marked files and delete them.

If that doesn’t work (i.e., the JPGs inherit the CR2s’ marked status), I would:

  1. Filter *.CR2 files in 2010 and mark them.
  2. Move these files into a sub-folder named Separate.
  3. Export JPGs from these CR2s back to 2010.
  4. Delete Separate.

Hope that helps!

No, you did not offend me. Each time someone suggests modifying raws, the downsides are never stated, and given that it may very well destroy the raws, such suggestions are most likely misguided.

Thanks for stating the reason that it is a bad idea. The rest came across as mean-spirited; there is no need for the noose imagery and my suggestions being misguided. I am sure that you are aware of the guidelines: FAQ - discuss.pixls.us.

1 Like