Go Back   Steve's Digicams Forums > Digital SLR and Interchangeable Lens Cameras > Sony Alpha dSLR / Konica Minolta dSLR, Sony SLT

Reply
 
Thread Tools Search this Thread
Old Jun 4, 2009, 1:57 PM   #11
Senior Member
 
Tullio's Avatar
 
Join Date: Jan 2006
Posts: 7,370
Default

Quote:
Originally Posted by JimC View Post
That's it's jpeg editor.
I'm not too sure about that. Once you preview the image, you can either click on Convert choosing the option for WB or click on Photo Edit at the bottom. Perhaps that too converts the image to JPEG. However, I noticed that in this case, all highlights are preserved (as opposed to the converted image) and there is no information regarding file name and size (which you get if you click on convert or you are editing a JPEG file from the camera). I shoot in RAW+JPEG and when I look at the two images in PHOTOSCAPE, I can definitely see a huge difference between them. The RAW image does not have blown highlights or artfacts, no sharpness or contrast applied to it. Also, the RAW image once you click on Photo Edit (not Convert), has no EXIF information (click little button at the top right) but the JPEG file does. So, if the image is not in the RAW format then it bust be something else but I don't believe it's been converted to JPEG either.
__________________

Tullio
Tullio is offline   Reply With Quote
Old Jun 4, 2009, 2:24 PM   #12
Administrator
 
Join Date: Jun 2003
Location: Savannah, GA (USA)
Posts: 22,378
Default

Look at it closely. The edit button is not available (it's grayed out) until *after* you use the Convert button (and it even gives you a screen update telling you it's converting to jpeg during the conversion process).

You can't edit anything until after that (then, it's already been converted from raw).

It's probably using Dave Coffin's dcraw.c code (most raw conversion products supporting lots of cameras do), and just passing the two parameters you can select from it's screens (camera's white balance, half size output).

That's only a very basic conversion, as you can only select the camera's "as shot" white balance versus customizing it during the conversion, and use the half size output switch if desired, which is one of the available dcraw.c switches.

Here are some of the available options (it can do *much* more than that). Basically, a better raw converter will have lots of options you can use during the conversion process, with sliders for tone curves, exposure, white balance, noise reduction, etc. Those converters will then pass parameters through the dcraw.c matrix (in the form of numeric values to the available options) to the dcraw.c code based on those slider positions. For example, the rgb multipliers used for the white balance slider you find in most raw converters so that you don't end up clipping individual channels trying to change it later (missing in photoscape for the conversion process, since it only allows the camera wb switch without being able to pass rgb multipliers based on slider positions) or the ability to control exposure during the conversion, or the ability to use the highlight recovery features as desired, or the ability to perform noise reduction at the raw level, etc., etc., etc.

It's just giving you a couple of switches you can choose from, without the options of a more tailored raw conversion. You could do much more just by using dcraw.c from command line. lol

Code:
Raw photo decoder "dcraw" v8.86
by Dave Coffin, dcoffin a cybercom o net

Usage:  dcraw [OPTION]... [FILE]...

-v        Print verbose messages
-c        Write image data to standard output
-e        Extract embedded thumbnail image
-i        Identify files without decoding them
-i -v     Identify files and show metadata
-z        Change file dates to camera timestamp
-w        Use camera white balance, if possible
-a        Average the whole image for white balance
-A <x y w h> Average a grey box for white balance
-r <r g b g> Set custom white balance
+M/-M     Use/don't use an embedded color matrix
-C <r b>  Correct chromatic aberration
-P <file> Fix the dead pixels listed in this file
-K <file> Subtract dark frame (16-bit raw PGM)
-k <num>  Set the darkness level
-S <num>  Set the saturation level
-n <num>  Set threshold for wavelet denoising
-H [0-9]  Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)
-t [0-7]  Flip image (0=none, 3=180, 5=90CCW, 6=90CW)
-o [0-5]  Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)
-o <file> Apply output ICC profile from file
-p <file> Apply camera ICC profile from file or "embed"
-d        Document mode (no color, no interpolation)
-D        Document mode without scaling (totally raw)
-j        Don't stretch or rotate raw pixels
-W        Don't automatically brighten the image
-b <num>  Adjust brightness (default = 1.0)
-q [0-3]  Set the interpolation quality
-h        Half-size color image (twice as fast as "-q 0")
-f        Interpolate RGGB as four colors
-m <num>  Apply a 3x3 median filter to R-G and B-G
-s [0..N-1] Select one raw image or "all" from each file
-4        Write 16-bit linear instead of 8-bit with gamma
-T        Write TIFF instead of PPM
A more full featured raw converter using Dave Coffin's dcraw.c code is going to give you sliders you can use with previews that give you a better approximation of the output you can expect, before that conversion process takes place, too (in addition to giving you a lot more control during that conversion process).

As for the EXIF data missing after you convert from raw, that's just a missing feature with Dave Coffin's dcraw.c code design.

Dave's dcraw.c code doesn't retain it, so better raw converters read the metadata from the raw file using other tools, and write that metadata output to the correct byte offsets in the output file from their dcraw.c based matrix. If you use dcraw.c from command line, the EXIF isn't retained either.
JimC is offline   Reply With Quote
Old Jun 4, 2009, 2:55 PM   #13
Senior Member
 
Tullio's Avatar
 
Join Date: Jan 2006
Posts: 7,370
Default

Quote:
Originally Posted by JimC View Post
Look at it closely. The edit button is not available (it's grayed out) until *after* you use the Convert button (and it even gives you a screen update telling you it's converting to jpeg during the conversion process).
No, it isn't. You click on Raw Converter from the main menu. Then Add (to select a RAW image (the file name will appear in the upper box). Then you highlight the file and at the bottom, you click on Preview. Photoscape will scan the photo and once it's done, the image will appear in the preview box at the bottom. At this point, the Photo Edit button is not grey'd out. You can click on it and a bigger screen will open with the image you are editing. At this time, there is no file name or size, no EXIF information, nothing. That's why I don't believe it is not a RAW image. As you can see, I did not click on Convert at all. In fact, you can select the white balance and click on Photo Edit (not on Convert) and the image will be open for editing with a different WB setting.
__________________

Tullio
Tullio is offline   Reply With Quote
Old Jun 4, 2009, 3:11 PM   #14
Administrator
 
Join Date: Jun 2003
Location: Savannah, GA (USA)
Posts: 22,378
Default

OK. I see the preview button, but it's converting it to jpeg if you use it. You can either save that output as jpeg immediately or edit it (and that output is only going to differ it you change the half size or camera white balance versus auto switches). At least it does read the metadata if you want it to (or it least it claims it does as I haven't examined the final output).

Once it's gone through that preview process (which is just a raw conversion), it's not converting from raw again later from what I can see (otherwise, it would take just as much time as it did giving you the initial preview, and that's not the case after any edits if you save the results).

IOW, you're just editing a jpeg file after you use the preview button. There is little doubt in my mind that the conversion is simply using dcraw.c code and only giving you the option to use a couple of it's many available switches and numeric values you can pass for the conversion. After that (click on the preview button or use the convert button), it's already been converted from raw.
JimC is offline   Reply With Quote
Old Jun 4, 2009, 3:42 PM   #15
Senior Member
 
Tullio's Avatar
 
Join Date: Jan 2006
Posts: 7,370
Default

OK Jim, I'll take your word for it even though I find it strange that the JPEG file in PHOTOSCAPE contains file name, size and EXIF data while the RAW file after the preview and Photo Edit does not. But, I'm not sure it matters that much. From what I can see, the RAW image does not look processed in any way in PHOTOSCAPE. I can recover highlights, adjust color curve, saturation curve, luminance curve, etc. and since the image has all the information preserved (as opposed to the camera-converted JPEG), I can create a good JPEG copy from it.
__________________

Tullio
Tullio is offline   Reply With Quote
Old Jun 4, 2009, 4:23 PM   #16
Administrator
 
Join Date: Jun 2003
Location: Savannah, GA (USA)
Posts: 22,378
Default

Dave's newer dcraw.c code is actually pretty good, and I really think that's what Photoscape is using for the conversion process, which I think is only happening when you press preview or convert ( not later on in the process from what I can tell from using it so far).

Otherwise, it would need more time to read the raw file and apply the edits during the conversion when you press Save later. It appears to be applying your edits to the already demosaiced data instead (changing what you see as you apply them), wiithout a separate conversion from raw based on your edits when you press Save later.

I've spent my share of time on the phone with Dave Coffin (the author of dcraw.c) over the years, discussing things like encryption used by camera manufacturers, the latest advancements in dcraw.c and how it's being licensed, as well as how some camera manufacturers appear to be modifying the raw data you get from the sensor (including the application of multipliers to the raw data for color purposes, and more). Sony isn't the only one that appears to be "cooking" raw. ;-)

It's pretty fascinating stuff. Ditto for how this code is being used in a number of applications with raw conversion features. I even made some crude mods to dcraw.c a few years back (actually, a bit longer back than that now). to support the hidden raw output from cameras like my Konica KD-510Z (until Dave could do it better when I sent him raw files to work with). So, even though I'm really not an expert (I don't have a very good grasp of much of Dave's code), I probably understand the conversion process better than most users. Of course, I can be wrong (and sometimes am). But, I don't think that's the case from what I can tell from how Photoscape is working (at least on the surface, since they don't publish their source code).
JimC is offline   Reply With Quote
Old Jun 4, 2009, 4:36 PM   #17
Senior Member
 
Tullio's Avatar
 
Join Date: Jan 2006
Posts: 7,370
Default

Well, this is all great information for sure. Thanks for all the replies, Jim.

Should we move on to EXIF next? I guess I'll start a new Topic...
__________________

Tullio
Tullio is offline   Reply With Quote
Old Jun 4, 2009, 5:19 PM   #18
Administrator
 
Join Date: Jun 2003
Location: Savannah, GA (USA)
Posts: 22,378
Default

The problem with the metadata is that much of it is proprietary (unpublished). Dave only uses a very small part of it in dcraw.c.

For example, he figures out where manufacturers store the "as shot" white balance and applies the same multipliers during the raw conversion process if you want to use the camera's white balance settings. Basically, the camera manufacturer simply stores some multipliers that are used during the conversion for each channel (Red, Green, Blue). If you remember, Nikon's encryption of this "as shot" WB data caused a big fuss a while back.

The raw conversion tools aren't doing something as simple as trying to figure out how to change the data for a given color temperature. Instead, they apply multipliers (for example, 2.15, 1.1, 1.27) to the Red, Green and Blue output during the demosaic process (increasing or decreasing the value associated with a given color channel based on those multipliers in the metadata), before writing the RGB values for each pixel to the demosaiced output. When Nikon started encrypting the values associated with these multipliers a while back, it caused a big fuss. But, Eric Hyman (the author of Bibble) broke the encryption, followed shortly by Dave Coffin (and Dave published his code). So, most raw converters can now apply a camera's white balance settings because of this work.

Most everything else in the metadata is usually ignored by dcraw.c code (unless Dave has changed it recently). So, other libraries can be used to read and interpret that information if you need it for a raw convertor/editor.
JimC is offline   Reply With Quote
Old Jun 4, 2009, 5:52 PM   #19
Senior Member
 
Tullio's Avatar
 
Join Date: Jan 2006
Posts: 7,370
Default

Is it possible to obtain a copy of Dave's code since it's been published? I did a Google search but did not find anything.
__________________

Tullio
Tullio is offline   Reply With Quote
Old Jun 4, 2009, 6:12 PM   #20
Administrator
 
Join Date: Jun 2003
Location: Savannah, GA (USA)
Posts: 22,378
Default

You'll see links to it on Dave's dcraw.c page here:

http://www.cybercom.net/~dcoffin/dcraw/

You may also want to take a look at the latest libraw library (which uses a lot of Dave's dcraw.c code).

http://www.libraw.org/

.
JimC is offline   Reply With Quote
 
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -5. The time now is 9:49 PM.