Apply "-compose stereo" over a PNG transparent file
Posted: 2018-03-29T18:05:47-07:00
Hi,
I'm having trouble in creating a stereo image with a transparent PNG source file.
My code below returns a stereo image, but on a black background, where I need it on a transparent background.
PS: I prefer to use the 'convert' tool, and not the 'composite' tool.
Using 'convert' is preferable as @fmw42 noted it in another post, because it avoids the need to split the process across multiple tools. (for reference : viewtopic.php?f=1&t=33152&p=151959&hilit=stereo#p151959)
Additional thought : Would this be related to the bug Found by Fred in this post ? http://www.imagemagick.org/discourse-se ... 93#p152093
Using IM v7.0.7-28 Q16 x64 HDRI
I'm having trouble in creating a stereo image with a transparent PNG source file.
My code below returns a stereo image, but on a black background, where I need it on a transparent background.
PS: I prefer to use the 'convert' tool, and not the 'composite' tool.
Using 'convert' is preferable as @fmw42 noted it in another post, because it avoids the need to split the process across multiple tools. (for reference : viewtopic.php?f=1&t=33152&p=151959&hilit=stereo#p151959)
Additional thought : Would this be related to the bug Found by Fred in this post ? http://www.imagemagick.org/discourse-se ... 93#p152093
Using IM v7.0.7-28 Q16 x64 HDRI
Code: Select all
convert ^
c:\SOURCE.png ^
-set colorspace sRGB ^
-background transparent ^
-gravity Center -extent 1000x1000 ^
-write mpr:ExtendedSrcImage +delete ^
^
-alpha Set ^
-channel RGBCMYKA ^
-background "rgba(255,255,255,0)" ^
mpr:ExtendedSrcImage mpr:ExtendedSrcImage ^
-geometry +15+15 -compose stereo ^
-composite ^
-write mpr:StereoImage +delete ^
^
mpr:StereoImage ^
-trim ^
c:\DESTINATION.png