PDA

View Full Version : Command line tool or code to extract JPEG from RAW ?


iwatkins
4th of March 2005 (Fri), 08:39
Hi All,

Does anybody know of a command line tool or even some source code, that allows you to quickly extract the JPEG embedded within a RAW (10D specifically, but generic better). ?

(I do mean the embedded JPEG, not converting the RAW to JPEG).

Thanks in advance for any pointers.

Cheers

Ian

kb244
4th of March 2005 (Fri), 09:09
I think something like one of the Canon software supposed to do that. But why do you want to do this?

chris.bailey
4th of March 2005 (Fri), 10:39
I think this is included in the Canon SDK though whether it is in a command line format I'm not so sure.

iwatkins
4th of March 2005 (Fri), 11:12
Thanks guys.

kb244,
Yes, I can do it in the Canon software (FVU I think) but would prefer not to.

I'm writing my own piece of software for studio use which will, when pointed at a directory, allow the display of indivdual images plus ordering info alongside. This will allow clients to see straight after a shoot the images they might want to buy and also allow them to select the size and number of prints required. The end result will be a text file containing these selections.

For speed I want the software to simply extract the embedded JPEG for speed and simplicity rather than batch process a stack of RAWs into JPEGs first.

I will then go through this list after the client has left and within PS CS process only those RAW images they want and get them ready for printing.

Chris,
Looks like I'll have to go and sign up for the SDK to at least give that a go. :)

Cheers

Ian

Nightcrawler
4th of March 2005 (Fri), 12:11
Does the 10D not store separate RAW and JPG files when it is set to RAW+JPG?

PacAce
4th of March 2005 (Fri), 13:10
Does the 10D not store separate RAW and JPG files when it is set to RAW+JPG?
No, but it does create a separate thumbnail file that has the .THM extension.

PacAce
4th of March 2005 (Fri), 13:13
Ian, if your working specificially with the 10D, can you not use the thumbnail files? They're nothing but JPEG files whose extensions have been changed to .THM. Or are they too small for your purposes.

kb244
4th of March 2005 (Fri), 13:28
Well for one , why use the jpeg , if you are shooting raw, but in the end you only extract the jpeg, why not shoot jpeg to start with?

BoySpot
4th of March 2005 (Fri), 14:22
Unlucky Ian. Seems that writing a long explanation of what you were doing and why wasn't worth it. It makes sense to one who has read what you wrote. Only sorry I can't answer the question you asked.

iwatkins
4th of March 2005 (Fri), 17:42
PacAce,
No, the THMs are too small (160 x 120), I really want the client to be able to see the shot basically full screen, allow them to scroll through images easily etc.

BoySpot
What can you do ? ;)

Cheers

Ian

laatikko
5th of March 2005 (Sat), 05:43
I wrote a small (95KB) program to do this, or more correctly: It is capable of doing that, but it would require few hours to code the command line user interface. It should be generic, and I have tested it with 300D and G2, in lack of more material. (The embedded JPEG-segment has few oddities... I would have to test that also).

Actually it is a CRW-decoder based on DCRaw, but enhanced to dump the CRW-structure, EXIF-information, extract the JPEG and possible thumbnail (the G2 also embeds the thumbnail to the CRW).

gary_hendricks
5th of March 2005 (Sat), 08:41
Hi All,

Does anybody know of a command line tool or even some source code, that allows you to quickly extract the JPEG embedded within a RAW (10D specifically, but generic better). ?

(I do mean the embedded JPEG, not converting the RAW to JPEG).

Thanks in advance for any pointers.

Cheers

Ian

Just curious - why do you need to have a command line tool?

kb244
5th of March 2005 (Sat), 08:44
Just curious - why do you need to have a command line tool?
I assume it's so that he can either do a bulk of raws via a batch file, or so that he can write a VB application to handle the batch processing using a system command to the commandline application.

iwatkins
5th of March 2005 (Sat), 11:39
Just curious - why do you need to have a command line tool?

Gary,

I just thought it might be more likely that one existed rather than source code that relied on the Canon SDK. With a command line tool I could trigger it from my main application which is being written in Delphi.

I've signed up for the SDK now, so if that goes through I'll be able to do it properly :)


laatikko

I wouldn't mind taking a look at that application if you don't mind. I'm not too bothered if it does other things as well. Drop me an email. :)

Cheers

Ian

iwatkins
6th of March 2005 (Sun), 15:21
Very big thanks to laatikko for doing some work on his code and letting me have the resultant EXE.

it does exactly what I want and very quick with it as well.

So to you, I thank you. :D

Cheers

Ian

SWPhotoImaging
7th of June 2005 (Tue), 09:16
I too am very interested in a simple JPG extractor for Canon Raw+JPG images. I have taken about 2500 pictures on a recent Italy trip, and want to run a batch JPG extraction on all of them to produce a CD or DVD of straight JPGs for all of the people that went on the trip with me.

I just don't want to wait until I have post-processed 2500 images to share the basic pictures with my travel companions. They can select from the extracted JPG's those images they'd like me to clean up or print from the higher-resolution TIF files. I am currently working on the CRW files, making TIF's, editing, cropping and saving for my own prints, modifications and such, and to make salable material ready.

I have never tried the FVU utility, but would guess that it can't easily handle mass extraction without a lot of human intervention. I'd gladly pay a reasonable fee for something quick and easy.

Thanks,

Steve

EOSAddict
7th of June 2005 (Tue), 09:27
I have never tried the FVU utility, but would guess that it can't easily handle mass extraction without a lot of human intervention. I'd gladly pay a reasonable fee for something quick and easy.

Thanks,

Steve

If its the same version of FVU I got with my 300D (can't check rigth now as not at homE) then you can batch extract JPEgs from RAW files..... works quite easily.

SWPhotoImaging
7th of June 2005 (Tue), 09:54
I'll have to dig out that (still packaged) CD that came with my 10D two years ago, install the software and then the updates to it, so I can check that out.

zeus
17th of April 2006 (Mon), 05:00
Does anybody know of a command line tool or even some source code, that allows you to quickly extract the JPEG embedded within a RAW (10D specifically, but generic better). ?

the best is: http://www.sno.phy.queensu.ca/~phil/exiftool/ (http://www.sno.phy.queensu.ca/%7Ephil/exiftool/)

to do some processing (losless lerotation and renaming according EXIF data) i've written small perl script renrot (ftp://ftp.dn.farlep.net/pub/misc/renrot/)

i have one shell script-wrapper to get jpg from RAW with copying EXIFs

all this just for batch processing