In fact, Anthony, this is the deal :
I know background is black
I know wave form should be "pure" color
So, I should determine the alpha value: easy, this is directly the pixel darkness, at the other hand, the color is directly the corresponding saturated one.
Thx!
Fmw42, your answer seems to be very complex at first glance and for what I understood plays with blur. Doesn't seem this cartesian to me
For your information, my "working" conversion batch is:
Code: Select all
convert "%~s1" -transparent black "%~dpn1_x.png"
So, I tried to write down, without trying to understand, your command line in a similar conversion batch file:
Code: Select all
convert "%~s1" \( -clone 0 -fill white +opaque black -blur 0x0.5 -level 50,100% \) \ -alpha off -compose copy_opacity -composite "%~dpn1_x.png"
But it throws errors:
Magick: unable to open image `\(': No such file or directory @ error/blob.c/OpenBlob/2572.
Magick: no decode delegate for this image format `\(' @ error/constitute.c/ReadImage/532.
Magick: option requires an argument `-level' @ error/convert.c/ConvertImageCommand/1773.
So I removed backslashes:
Code: Select all
convert "%~s1" ( -clone 0 -fill white +opaque black -blur 0x0.5 -level 50,100% ) -alpha off -compose copy_opacity -composite "%~dpn1_x.png"
But I still get an error:
Magick: option requires an argument `-level' @ error/convert.c/ConvertImageCommand/1773.
I don't understand much for -level is included :/
This is too complex for me as a first approach, sorry.
I think I'll undestand this when I have a week or two of writing scripts...
Thk you very much for your efforts, though, much appreciated.
Best regards,
Art.