Gamma Corrected Down-sizing -- just 4 fun!
Posted: January 13th, 2019, 2:01 pm
...
Ref: PWP 8.0.exe 190111
Something that may be of interest... ...a nuance in down-scaling is to resize the linear version (gamma = 1.00) of the original image...
The following workflow will down-size an image to 600px wide (chosen because the message board accepts up to 600x600px images) with a gamma (2.22) corrected version and without gamma correction.
The PWP8 browser workflow: The script: " Downsize to 600px with-without Gamma Correction.script "
------------------------------------------------------------------------------------------------------
script 1.0
color_management enabled 1 on_mismatch 0 on_batch_mismatch 0 acs_profile ″sRGB Color Space Profile.icm″ gray_acs_profile ″Gamma 2.2.icm″ wcs_profile ″sRGB Color Space Profile.icm″ gray_wcs_profile ″Gamma 2.2.icm″ monitor_curves_file ″″ monitor_curves_enabled 0
image index 1 caption ″5-DSCF2121_16x9r.tif″ saved_as ″″ saved_on ″″ parent -1 bypass -1 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴file_open 0 n_files 1 current 0 show_progress 1 from_default 0 file1 ″″ time1 ″″‴
end_image
splitter index 6 parent 1 n_branches 2 caption ″Splitter″
side_branch index 8 parent 6 branch_number 1 caption ″No Gamma Correction″
image index 9 caption ″Resize 600px 100dpi Bicubic″ saved_as ″″ saved_on ″″ parent 8 bypass 0 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴resize 0 onx 600 ony 338 dpi 100 memory 80901504 iunits 0 wunits 0 runits 0 resample 0 set 0 method 2 sharpen -0.75 display 1 auto_preview 1‴
end_image
image index 10 caption ″Sharpen″ saved_as ″″ saved_on ″″ parent 9 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴sharpen 0 kernel 0 maxovershoot 0.0667 maxundershoot 0.1000 threshold 2 strength 1.2500 amount 0.8750 -1 0 0 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1‴
end_image
side_branch index 7 parent 6 branch_number 0 caption ″Gamma Correction″
image index 2 caption ″De-Gamma 2.22″ saved_as ″″ saved_on ″″ parent 7 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴gamma_adjust 0 gray 0 rgamma 2.2200 ggamma 2.2200 bgamma 2.2200 amount 1 -1 0 0 ″Amount: ″ ″Mask″ display 1 sync_scroll 1 auto_preview 1‴
end_image
image index 3 caption ″Resize 600px 100dpi Bicubic″ saved_as ″″ saved_on ″″ parent 2 bypass 0 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴resize 0 onx 600 ony 338 dpi 100 memory 80901504 iunits 0 wunits 0 runits 0 resample 0 set 0 method 2 sharpen -0.75 display 1 auto_preview 1‴
end_image
image index 4 caption ″Re-Gamma 2.22″ saved_as ″″ saved_on ″″ parent 3 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴gamma_adjust 0 gray 0 rgamma 0.4500 ggamma 0.4500 bgamma 0.4500 amount 1 -1 0 0 ″Amount: ″ ″Mask″ display 1 sync_scroll 1 auto_preview 1‴
end_image
image index 5 caption ″Sharpen″ saved_as ″″ saved_on ″″ parent 4 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴sharpen 0 kernel 0 maxovershoot 0.0667 maxundershoot 0.1000 threshold 2 strength 1.2500 amount 0.8750 -1 0 0 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1‴
end_image
image index 11 caption ″50%Blend Imgs 5 & 10″ saved_as ″″ saved_on ″″ parent 5 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 1 n_masks 2 command ‴composite 0 operation 0 alignment 0 nalign 0 label 1 overlay_color ffffff overlay_amount 0.5 -1 0 0 ″Overlay Amount:″ ″Overlay Mask″ amount 1 -1 0 0 ″Amount:″ ″Base Mask″ display 2 sync_scroll 1 auto_preview 1 ‴
input base_image 11 input_number 0 index 10 caption ″Overlay″
end_image
end
------------------------------------------------------------------------------------------------------
The resulting image whose original size was 4896x2754 pixels: Compare imgs 4 (gamma corrected) and 9 (no correction) to see the nuance.
The script does a 50%Blend of the sharpened two versions. Adjust the Blend to preference and image content.
Edit the Resize transforms for differing down-size then 600px wide, 100dpi, and Bicubic resampling.
Ask if there are questions... ...have fun exploring and learning PWP8!!!
...den...
Ref: PWP 8.0.exe 190111
Something that may be of interest... ...a nuance in down-scaling is to resize the linear version (gamma = 1.00) of the original image...
The following workflow will down-size an image to 600px wide (chosen because the message board accepts up to 600x600px images) with a gamma (2.22) corrected version and without gamma correction.
The PWP8 browser workflow: The script: " Downsize to 600px with-without Gamma Correction.script "
------------------------------------------------------------------------------------------------------
script 1.0
color_management enabled 1 on_mismatch 0 on_batch_mismatch 0 acs_profile ″sRGB Color Space Profile.icm″ gray_acs_profile ″Gamma 2.2.icm″ wcs_profile ″sRGB Color Space Profile.icm″ gray_wcs_profile ″Gamma 2.2.icm″ monitor_curves_file ″″ monitor_curves_enabled 0
image index 1 caption ″5-DSCF2121_16x9r.tif″ saved_as ″″ saved_on ″″ parent -1 bypass -1 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴file_open 0 n_files 1 current 0 show_progress 1 from_default 0 file1 ″″ time1 ″″‴
end_image
splitter index 6 parent 1 n_branches 2 caption ″Splitter″
side_branch index 8 parent 6 branch_number 1 caption ″No Gamma Correction″
image index 9 caption ″Resize 600px 100dpi Bicubic″ saved_as ″″ saved_on ″″ parent 8 bypass 0 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴resize 0 onx 600 ony 338 dpi 100 memory 80901504 iunits 0 wunits 0 runits 0 resample 0 set 0 method 2 sharpen -0.75 display 1 auto_preview 1‴
end_image
image index 10 caption ″Sharpen″ saved_as ″″ saved_on ″″ parent 9 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴sharpen 0 kernel 0 maxovershoot 0.0667 maxundershoot 0.1000 threshold 2 strength 1.2500 amount 0.8750 -1 0 0 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1‴
end_image
side_branch index 7 parent 6 branch_number 0 caption ″Gamma Correction″
image index 2 caption ″De-Gamma 2.22″ saved_as ″″ saved_on ″″ parent 7 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴gamma_adjust 0 gray 0 rgamma 2.2200 ggamma 2.2200 bgamma 2.2200 amount 1 -1 0 0 ″Amount: ″ ″Mask″ display 1 sync_scroll 1 auto_preview 1‴
end_image
image index 3 caption ″Resize 600px 100dpi Bicubic″ saved_as ″″ saved_on ″″ parent 2 bypass 0 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴resize 0 onx 600 ony 338 dpi 100 memory 80901504 iunits 0 wunits 0 runits 0 resample 0 set 0 method 2 sharpen -0.75 display 1 auto_preview 1‴
end_image
image index 4 caption ″Re-Gamma 2.22″ saved_as ″″ saved_on ″″ parent 3 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴gamma_adjust 0 gray 0 rgamma 0.4500 ggamma 0.4500 bgamma 0.4500 amount 1 -1 0 0 ″Amount: ″ ″Mask″ display 1 sync_scroll 1 auto_preview 1‴
end_image
image index 5 caption ″Sharpen″ saved_as ″″ saved_on ″″ parent 4 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴sharpen 0 kernel 0 maxovershoot 0.0667 maxundershoot 0.1000 threshold 2 strength 1.2500 amount 0.8750 -1 0 0 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1‴
end_image
image index 11 caption ″50%Blend Imgs 5 & 10″ saved_as ″″ saved_on ″″ parent 5 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 1 n_masks 2 command ‴composite 0 operation 0 alignment 0 nalign 0 label 1 overlay_color ffffff overlay_amount 0.5 -1 0 0 ″Overlay Amount:″ ″Overlay Mask″ amount 1 -1 0 0 ″Amount:″ ″Base Mask″ display 2 sync_scroll 1 auto_preview 1 ‴
input base_image 11 input_number 0 index 10 caption ″Overlay″
end_image
end
------------------------------------------------------------------------------------------------------
The resulting image whose original size was 4896x2754 pixels: Compare imgs 4 (gamma corrected) and 9 (no correction) to see the nuance.
The script does a 50%Blend of the sharpened two versions. Adjust the Blend to preference and image content.
Edit the Resize transforms for differing down-size then 600px wide, 100dpi, and Bicubic resampling.
Ask if there are questions... ...have fun exploring and learning PWP8!!!
...den...