Photo Viewer Crop documentation

Sorry to list this as a feature request, but Directory Opus manual isn't in the list.
Perhaps I missed it, but the Shift Select function in the photo viewer doesn't seem to be documented in the manual.
The idea is to select a rectangular area that can then be cropped to using the default edit crop entry.

Well, as this is listed a feature request, I'll add one.
The idea is old, and I have only one photo program that can do it.
The idea is the ability to draw enclosing lines about areas of the photo and have them compressed at a different quality level than the remainder of the photo. Long ago this was very useful to reduce image file size on photos posted o the internet. Reality was that it helped much to shrink file size while keeping details in sharp focus. They still look very good !

Almost obsolete today, I still find uses for it with email.
It was a British program called XAT Image Optimizer Pro. It still works mostly, but it has been long abandoned by the authors. Could it be done in any way with scripting ? Just curious !

So back to the topic. Perhaps this Shift selection needs to be documented?

This is a highly specific request for DOpus, let alone for any photo app but it sounds like you could use selective blurring instead, which very common these days.

Regardless, here's the batch file for it, you'll need ImageMagick. You could rewrite it as a DOpus script if you'd have the coordinates of the selected region in the viewer, but I am not familiar with if or how it is supported. Of course with few changes it could be used for blurring as well.

@echo off
setlocal

:: original image file
set original_image=your_image.jpg

:: convert original image to png before processing
set intermediate_image=intermediate_image.png

:: temp files to hold the high and low-quality segments
set high_quality_crop=high_quality_crop.png
set low_quality_bg=low_quality_bg.png
set final_image=final_output.jpg

:: convert original image to png
magick convert "%original_image%" "%intermediate_image%"

:: dimensions for the high-quality area (x, y, width, height)
:: these values should be adjusted based on the specific area you want to retain at high quality
set x=100
set y=100
set width=300
set height=200

:: step 1: crop the high-quality area from the png image
magick convert "%intermediate_image%" -crop "%width%x%height%+%x%+%y%" +repage "%high_quality_crop%"

:: step 2: create a low-quality version of the png image
magick convert "%intermediate_image%" -quality 5 "%low_quality_bg%"

:: step 3: overlay the high-quality crop onto the low-quality background
magick convert "%low_quality_bg%" "%high_quality_crop%" -geometry "+%x%+%y%" -composite "%final_image%"

:: cleanup temp files
del "%high_quality_crop%"
del "%low_quality_bg%"
del "%intermediate_image%"

echo Finished processing. The final image is '%final_image%'.

EDIT: Leo/Jon: Is it possible to add selbottom, selleft, selright, seltop to Viewer object analog to bottom, left.. which would return selection coordinates?

Sure. Next beta.

2 Likes

It's documented here ("Select part of the image").

Thanks,
Yes, it was on the next page. I was looking for it on the overview page.
Interesting though that it took your understanding of Directory Opus to point that out.