Combined convert commands - UNIX - buggy
Posted: 2017-07-01T22:19:52-07:00
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-06-26 xubuntu 16.04
The following commands generate individual R G B L L* channels as well as combining into LRGB and L*RGB images.
I have attempted a couple of -clone examples below combining lines 1, 2 and 3 and lines 4, 5 and 6 - working but buggy?
Given that the remainder have different input files, is there a way of combining into fewer convert commands.
Lines 1, 2, 3 - works but continues to generate %d_lab.miff images until CtrlC kills the process. Though this is likely a bash issue.
Lines 4, 5, 6 - fails to write B.miff properly. And I am not certain the R G B files are being generated in strict order.
The following commands generate individual R G B L L* channels as well as combining into LRGB and L*RGB images.
I have attempted a couple of -clone examples below combining lines 1, 2 and 3 and lines 4, 5 and 6 - working but buggy?
Given that the remainder have different input files, is there a way of combining into fewer convert commands.
Code: Select all
convert stack.miff -depth 16 -separate %d.miff
convert stack.miff -depth 16 -colorspace Gray -separate -average L.miff
convert stack.miff -depth 16 -colorspace LAB -separate %d_lab.miff
convert 0.miff -depth 16 R.tiff
convert 1.miff -depth 16 G.tiff
convert 2.miff -depth 16 B.tiff
convert L.miff -depth 16 +compress -auto-level L.tiff
convert 0_lab.miff -depth 16 +compress MASK.tiff
convert 0.miff 1.miff 2.miff L.miff -depth 16 +compress -colorspace sRGB -combine -alpha off LRGB.tiff
convert 0.miff 1.miff 2.miff 0_lab.miff -depth 16 +compress -colorspace sRGB -combine -alpha off LightRGB.tiff
Code: Select all
convert stack.miff \( -clone 0 -depth 16 -separate +write %d.miff \) \
\( -clone 0 -depth 16 -colorspace Gray -separate -average +write L.miff \) \
-depth 16 -colorspace LAB -separate %d_lab.miff
Code: Select all
convert 0.miff 1.miff 2.miff \( -clone 0 -depth 16 +write R.miff \) \
\( -clone 1 -depth 16 +write G.miff \) \
-depth 16 B.miff