24
submitted 1 year ago* (last edited 1 year ago) by gonzoknowsdotcom1@monero.town to c/asklemmy@lemmy.ml

Issue - I have 282 .CR2(raw) photos that need to be converted in batch/mass to same time but don't know how. OS - Vanilla OS 22.10 (Ubuntu)

  • Can this be done with darktable? If so how?
  • Any software recommendations for this? I rather not use online tools for privacy and compression reasons.
top 19 comments
sorted by: hot top controversial new old
[-] zurohki@aussie.zone 19 points 1 year ago

With GNU Parallel and Imagemagick installed, this command should do it:

parallel convert {} {.}.jpg ::: *.cr2

As always, backup your files before you run things some internet rando gave you.

[-] davad@lemmy.world 3 points 1 year ago

Check out mogrify. I think it's installed standard with ImageMagick, and it does wildcard conversions.

[-] zurohki@aussie.zone 1 points 1 year ago

Can mogrify do format conversion? I thought it was for editing images. It doesn't even seem to have a way to specify input and output filenames.

[-] davad@lemmy.world 1 points 11 months ago

Yes. I've used it to batch convert PNG and jpg to webp.

[-] gonzoknowsdotcom1@monero.town 2 points 1 year ago* (last edited 1 year ago)

Thank you for this! I will test it out

Do you have an example?

[-] zurohki@aussie.zone 5 points 11 months ago* (last edited 11 months ago)

I'm not sure what you're asking for. That's the command. Unless you meant an explanation?

The basic command is convert filename.cr2 filename.jpg.

That parallel command runs the convert command on all of the .cr2 files in the current directory, running a bunch of them simultaneously. {} is replaced with the name of a file, and {.} is replaced with the filename without the extension.

https://www.gnu.org/software/parallel/parallel_examples.html

If you didn't want to use parallel and are okay with it slowly converting one file at a time, you can just use a for loop:

for file in *.cr2 ; do
  convert $file ${file%.cr2}.jpg
done

That one uses some Bash variable magic to remove the .cr2 and add .jpg to the file name of the output file.

convert is smart enough that you can just give it an output name ending in .jpg and it knows it should convert the input file to JPEG.

[-] 4z01235@lemmy.world 4 points 11 months ago

Example? They gave you the exact thing to run.

[-] mp3@lemmy.ca 6 points 1 year ago

Your best bet would be imagemagick in command-line

https://blog.nathantsoi.com/article/Batch_Convert_CR2_to_JPG/

[-] Goodvibes@lemmy.cafe 4 points 1 year ago

Since you mentioned darktable I assume you already know this, but depending on the camera's raws and the presets that imagemagick has for converting these photos the results might be undesirable if not inspected or tweaked. Not disparaging any advice given here, just mentioning that generally raws are edited on a case by case basis to fix camera artifacts and color issues. Hope the solutions others have posted work out for you!

Gimp has a batch mode and is open source iirc

[-] gonzoknowsdotcom1@monero.town 1 points 1 year ago
[-] bernieecclestoned@sh.itjust.works 1 points 11 months ago
[-] dingus@lemmy.world 4 points 11 months ago* (last edited 11 months ago)

I'm a bit of a basic batch myself

[-] bernieecclestoned@sh.itjust.works 2 points 11 months ago

That has to be deliberate doesn't it?

[-] toxicyeti@sh.itjust.works 1 points 1 year ago

I use XnviewMP for different things. It has a ton of functionality and they have other products as well that might help. https://www.xnview.com

[-] Num10ck@lemmy.world 1 points 1 year ago

is there an equivalent to Directory Opus on linux?

[-] illectrility@sh.itjust.works 1 points 1 year ago

Throw them into darktable and export them to JPEG

[-] gonzoknowsdotcom1@monero.town 1 points 1 year ago

for 282 photos this will take ages

[-] illectrility@sh.itjust.works 1 points 11 months ago* (last edited 11 months ago)

It's actually pretty quick for me with 95% JPEGs. But your mileage may of course vary.

You can just select them all and export them into a folder. Maybe overnight?

this post was submitted on 25 Sep 2023
24 points (96.2% liked)

Asklemmy

43394 readers
1333 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS