RAW and JPEG preview selection

Hi there,

I'm wondering how to optimize my photo preselection within Dopus:

  1. I have RAWs and JPEGs with similar names, I would like to automatically group the RAW and JPEGs, so both are deleted if I delete one of them. The best would be to mainly Focus the JPEG, so the bigger RAWs are not unnecessarily loaded into the DO-frame.

  2. I would like to maximize the preview of PICs to 2048px (let’s say more than the 256px which can be chosen in DO)

hope someone can help me our here?

Regards,
Alex

1 Like
  1. There are a few ways that could be done, but the best/safest is probably to change the delete button you are using (or add a new special one) to one which runs a script, looks for any selected .jpg files, and adds the corresponding .raw files if they exist. It would require some scripting knowledge to write.

  2. If you mean thumbnails, you can use Preferences / Miscellaneous / Advanced: max_thumbnail_size to increase the max size (256 multiplied by system DPI factor by default).

If you mean the preview pane / viewer, the size of jpegs and raws in that is not usually limited, except for some raw types if they are configured to use embedded thumbnails instead of (slow) full decodes.

Hi Leo,

I forgot to thank you for your Feedback;
however, the custom script for deleting the RAWs togheter with the JPEGs is something which could work, lets see if i'm able to figure out how to do this.
Dopus is much faster as any other photo tool (Lightroom etc.) so i-m using it to preselect the good pictures after a shooting session.
Now, such a funtionality is what I would like to see in some of the upcoming versions.

Thanks again for zour ehlp,
Alex

I think this button/script will do what you're after.

See the last part of How to add buttons from this forum to your toolbars for how to drag a .dcf file to create a button on your toolbar:

Test VBScript.dcf (2.31 KB)

Here is what the VBScript in the button looks like, for reference. (You don't need to copy & paste this anywhere; it is all in the .dcf file above.)

[code]
rawExt = ".raw"

Function OnClick(ByRef clickData)
Set cmd = clickData.func.command
Set fsu = DOpus.FSUtil
Set filesToDelete = DOpus.Create.StringSetI

For Each Item In clickData.func.sourcetab.selected_files

  filesToDelete.insert(item.realpath)

  If (LCase(Item.ext) = ".jpg") Then
     Set altItemPath = fsu.NewPath(item.realpath)
     altItemPath.ext = rawExt
     If (fsu.Exists(altItemPath)) Then
        filesToDelete.insert altItemPath
     End If
  ElseIf (LCase(Item.ext) = LCase(rawExt)) Then
     Set altItemPath = fsu.NewPath(item.realpath)
     altItemPath.ext = ".jpg"
     If (fsu.Exists(altItemPath)) Then
        filesToDelete.insert altItemPath
     End If
  End If

Next

If (Not filesToDelete.Empty) Then

  cmd.ClearFiles
  For Each filePath In filesToDelete
     cmd.AddFile filePath
  Next

' cmd.RunCommand "Delete"
cmd.RunCommand "Select FROMSCRIPT"
End If

End Function[/code]

After creating the button, edit it and you should see similar code.

You'll want to edit the top line of the script (rawExt = ".raw") to set the raw extension you're using. I've used ".raw" but it will probably be different, depending on the type of camera.

Also note the cmd.RunCommand lines near the bottom. As it comes, the script will only select the files, so you can test that it is doing what you expect it to do, before doing anything destructive with it. Please test that, in case I have misunderstood your requirements!

If you comment out the cmd.RunCommand "Select FROMSCRIPT" line (add a single quote ' to the start) and un-comment the cmd.RunCommand "Delete" line above it (remove the ' from the start), the script will then delete the files it was previously selecting.

The behavior of the script should be to select/delete all selected files, and to also select/delete any .jpg/.raw partner of any .jpr/.raw file that was initially selected.

I'm not against scripting at all, but here it looks like simple commands get the job done just as well? The beauty of the oldschool buttons is not to underestimate at times. o) This is what I use to delete jpg + raw at the same time. I've assigned + to it, in case you are wondering about a nice shortcut. o) If there are any drawbacks compared to the scripted version of yours Leo, plz let me know! o)

@confirm Delete jpg(s) and belonging raw file(s)? Delete QUIET "{sourcepath}\{file$|noext}.jpg" Delete QUIET "{sourcepath}\{file$|noext}.rw2"

You might be interested in these as well..

This one filters the filedisplay to show only jpgs:

[code]@toggle:if SHOWFILTERFILENAME=*.jpg
@nodeselect

@ifset:SHOWFILTERFILENAME=*.jpg
Set FOCUS=Source
Set SHOWFILTERFILENAME
Select PATTERN="{file$|noext}*rw2" DESELECT
SelectEx MAKEVISIBLE=checked

@ifset:else
Set SHOWFILTERFILENAME=*.jpg
Select PATTERN="{file$|noext}jpg"
SelectEx MAKEVISIBLE=checked
[/code]
This one filters the filedisplay to show only the raw files (
.rw2 for me):

[code]@toggle:if SHOWFILTERFILENAME=*.rw2
@nodeselect

@ifset:SHOWFILTERFILENAME=*.rw2
Set FOCUS=Source
Set SHOWFILTERFILENAME
Select PATTERN="{file$|noext}*jpg" DESELECT
SelectEx MAKEVISIBLE=checked

@ifset:else
Set SHOWFILTERFILENAME=*.rw2
Select PATTERN="{file$|noext}*rw2"
SelectEx MAKEVISIBLE=checked
[/code]
You need the SelectEx script addin for this to work as intended. The sweet thing is, you can select jpg and switch over to the raw view and it would automatically select the matching raw file(s) and scroll to the appropriate position as well. It works the other way round too of course. This allows to quickly get access to single or multiple files of the "other" type while sorting and choosing without both files appearing at the same time, which can get confusing at times. I prefer the raw view for seeking through and pre-sorting, since thumbnails and viewer work much faster with the raw files. The smaller jpgs within in the raw files decode much faster than the separate full size jpgs.

Deleting raw and belonging jpg is easy with the solutions already given, no need for both files to be visible at the same time.

1 Like

With the script you'll get a proper count & size of files that are about to be deleted, and it'll only convert .jpg->.raw or .raw->.jpg (so if you delete a .txt file using the same button, it won't delete a corresponding .jpg).

Using "Delete QUIET" in the non-script version will also suppress error messages, not just the confirmation before each deletion, which you might not want.

Yes thanks. Indeed some points that make me think! o)