Page 1 of 1

Snippet with Splitter - odd behavior

Posted: June 19th, 2023, 7:40 pm
by pierrelabreche
When inserting a snippet containing split branches, I observed an odd behavior : The split branches appear to have been serialized, instead of being inserted in parallel.

Refer to attached screen capture.
I created the snippet from the workflow tree shown on the left, and inserted it on the image to the right.
2023-06-19 PWP8 Snippet-with-Splitter.png
2023-06-19 PWP8 Snippet-with-Splitter.png (267.88 KiB) Viewed 1121 times
Snippet contents follows :
snippet 1.0
PWP_Version ″Picture Window Pro 8.0.368″

original_script_pathname ″C:\Users\pierr\Documents\Picture Window Pro\Snippets\PL-standard-avec-2-rognages.snip″


image index 96 caption ″Dehaze″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 10 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴dehaze 0 haze_color e8acb5 strength 0.0735 amount 1 -1 0 1 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1‴
end_image

image index 97 caption ″Multi Color Balance″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 96 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴multi_color_balance 0 npts 2 white 2 black 2 white_threshold 0 black_threshold 0 probesize 1 curpt 1 amount 1 -1 0 1 ″Amount: ″ ″Mask″ display 2 sync_scroll 1 auto_preview 1 enable1 1 inconsistent1 0 src1 0 dst1 0 enable2 1 inconsistent2 0 src2 f1f7f4 dst2 ffffff‴
end_image

image index 98 caption ″Multipass Sharpen″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 97 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴multipass_sharpen 0 amount 1 -1 0 1 ″Amount: ″ ″Mask″ method 1 what 1 current_pass 0 display 1 sync_scroll 1 passa1 1 3 173 0.0338 0.0952 1.3724 0.0666 0.0699 passa2 1 61 148 0.0523 0.1092 1.218 0.0676 0.0755 passa3 0 5 100 0.04 0.04 1.5 0.1 0.1‴
end_image

image index 99 caption ″Brightness Curve″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 98 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 1 command ‴brightness_curve 0 amount 1 -1 2 1 ″Amount: ″ ″Mask″ colorspace 0 colorspace1 0 advanced 1 sharpen_method 1 mask_histogram 0 which_curve 0 curve 4 2 0 0 86 78 227 216 255 255 colorbal ffffff colorbal_remove ffffff saturation 0 radius 10 threshold 100 detail 1.2111 antialias 0 curve1 2 2 0 0 255 255 colorbal1 ffffff colorbal_remove1 ffffff saturation1 0 radius1 10 threshold1 100 detail1 1 antialias1 0 display 2 sync_scroll 1 auto_preview 1 ‴
end_image

image index 100 caption ″Paint″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 99 bypass 0 same_size 1 size_specific 1 breakpoint 0 n_inputs 0 n_masks 1 command ‴paint 0 nx 8256 ny 5504 amount 1 -1 0 1 ″Amount: ″ ″Mask″ display 1 sync_scroll 1 nstrokes 3 brush_radius 1000 brush_transparency 79.8161 brush_softness 67.2762 brush_spacing 0.25 brush_fade 0 brush_shape 0 brush_mode 7 brush_single 0 brush_color 16777215 pressure_controls 0 pstroke0 308.4 79.82 67.28 0.25 0 0 7 0 ffffff 2 0 0 pstroke1 1000 79.82 67.28 0.25 0 0 7 0 ffffff 2 0 1 0.4647 0.7704 pstroke2 1000 79.82 67.28 0.25 0 0 7 0 ffffff 2 0 1 0.5134 0.7704‴
end_image

splitter index 101 parent 100 n_branches 2 caption ″Splitter″ comment ″″

side_branch index 102 parent 101 branch_number 0 caption ″Branch 1″ comment ″″

image index 104 caption ″Crop″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 102 bypass 0 same_size 0 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴crop 0 nx 8256 ny 5504 cx 0.52389479 cy 0.5982619 w 0.95221042 h 0.80347621 angle 0 proportions 22 orientation 1 units 0 batch_reset_crop_rect 0 grid 5 n 3 grid_name ″None″ propwidth 16 propheight 9 resize 0 resample 0 resamplesize 8 resampledimension 0 resampleunits 1 resampledpi 300 resamplemethod 2 display 2 auto_preview 1‴
end_image

image index 105 caption ″Export″ comment ″″ saved_as_pathname ″″ saved_on_date ″″ parent 104 bypass 0 same_size 1 size_specific 0 breakpoint 0 n_inputs 0 n_masks 0 command ‴export 0 destination 0 file_type 2 default_file_type 1 file_name 0 if_exists 2 resize 1 resample 1 dimension 3 length 1920 width 1000 height 800 units 0 dpi 100 demote16 0 pad_color 0 profile 2 tiff_ask 1 tiff_metadata 0 tiff_save_script 0 tiff_compression 0 jpeg_ask 1 jpeg_metadata 0 jpeg_save_script 0 jpeg_quality 98.21 jpeg_chroma_subsampling 0 jpeg_summary 0 bmp_ask 1 bmp_v5 0 bmp_save_script 0 png_ask 1 png_metadata 0 png_save_script 0 gif_ask 1 gif_save_script 0 sharpen 1 which_folder 0 folder ″″ first_file_name ″″ display 1 sync_scroll 1 auto_preview 1‴
end_image

end

Re: Snippet with Splitter - odd behavior

Posted: June 19th, 2023, 9:56 pm
by jsachs
I did not design snippets to work with splitters so I am not surprised they behave strangely. At a minimum, it should give you an error message. Anyway, I will take a look at what it would take to make this work for some future release.

As an aside, in the example you present, you could easily get the correct result by selecting just the top level image and then cloning the entire branch which will then let you load a new top-level image for the cloned branch.

Re: Snippet with Splitter - odd behavior

Posted: June 19th, 2023, 10:19 pm
by pierrelabreche
In this example, if I select a branch with splitters, and insert copies of the selected transformations , everything works as expected.

However, if a stored snippet is executed, it does not work.

Re: Snippet with Splitter - odd behavior

Posted: June 20th, 2023, 7:28 am
by jsachs
It does say in the help file than snippets may not include splitters or branches. I looked at the code and adding this would be complicated, however I did add code to check for this case and provide an error message.