Page 2 of 2

Re: Working with alpha channel

Posted: 2015-03-20T12:28:31-07:00
by lorents
Please tell me
how this image

Image

Code: Select all

convert -alpha off
Image

made like this

Image

Code: Select all

convert -alpha off
Image

Can you please tell

Re: Working with alpha channel

Posted: 2015-03-20T12:56:56-07:00
by snibgo
It can't. The process needs to know which pixels to smear, and which mustn't be smeared. One of your previous images contains this information: the black shadow beneath the bird against the white background, birdBkW.png.

Re: Working with alpha channel

Posted: 2015-03-20T13:06:33-07:00
by lorents
I think you can do so

Code: Select all

ImageMagick\convert ^
1.png ^
-alpha background ^
-alpha off ^
2.png

ImageMagick\convert ^
2.png ^
-transparent White ^
-compose DstOver ^
( -clone 0 ) -geometry +1+0 -composite ^
( -clone 0 ) -geometry +2+0 -composite ^
( -clone 0 ) -geometry +4+0 -composite ^
( -clone 0 ) -geometry +8+0 -composite ^
( -clone 0 ) -geometry +16+0 -composite ^
( -clone 0 ) -geometry +32+0 -composite ^
( -clone 0 ) -geometry +64+0 -composite ^
( -clone 0 ) -geometry +128+0 -composite ^
( -clone 0 ) -geometry -1+0 -composite ^
( -clone 0 ) -geometry -2+0 -composite ^
( -clone 0 ) -geometry -4+0 -composite ^
( -clone 0 ) -geometry -8+0 -composite ^
( -clone 0 ) -geometry -16+0 -composite ^
( -clone 0 ) -geometry -32+0 -composite ^
( -clone 0 ) -geometry -64+0 -composite ^
( -clone 0 ) -geometry -128+0 -composite ^
-background White -compose Over -layers flatten ^
2.png
continue to use your code

But I do not understand how do I set the alpha channel

Re: Working with alpha channel

Posted: 2015-03-20T14:11:36-07:00
by lorents
I figured, thank you very much.

Code: Select all

ImageMagick\convert ^
1.png ^
-alpha background ^
-alpha off ^
-transparent White ^
-compose DstOver ^
( -clone 0 ) -geometry +1+0 -composite ^
( -clone 0 ) -geometry +2+0 -composite ^
( -clone 0 ) -geometry +4+0 -composite ^
( -clone 0 ) -geometry +8+0 -composite ^
( -clone 0 ) -geometry +16+0 -composite ^
( -clone 0 ) -geometry +32+0 -composite ^
( -clone 0 ) -geometry +64+0 -composite ^
( -clone 0 ) -geometry +128+0 -composite ^
( -clone 0 ) -geometry -1+0 -composite ^
( -clone 0 ) -geometry -2+0 -composite ^
( -clone 0 ) -geometry -4+0 -composite ^
( -clone 0 ) -geometry -8+0 -composite ^
( -clone 0 ) -geometry -16+0 -composite ^
( -clone 0 ) -geometry -32+0 -composite ^
( -clone 0 ) -geometry -64+0 -composite ^
( -clone 0 ) -geometry -128+0 -composite ^
-background White -compose Over -layers flatten ^
1.png ^
-compose CopyOpacity -composite ^
2.png
How can I change the background to a picture are not white, and black?

Re: Working with alpha channel

Posted: 2015-03-20T14:47:28-07:00
by lorents
Tell me, please , why not work?

Code: Select all

for %%i in (a0\*) do (
	ImageMagick\convert ^
	"%%i" ^
	-alpha background ^
	-alpha off ^
	-transparent White ^
	-compose DstOver ^
	( -clone 0 ) -geometry +1+0 -composite ^
	( -clone 0 ) -geometry +2+0 -composite ^
	( -clone 0 ) -geometry +4+0 -composite ^
	( -clone 0 ) -geometry +8+0 -composite ^
	( -clone 0 ) -geometry +16+0 -composite ^
	( -clone 0 ) -geometry +32+0 -composite ^
	( -clone 0 ) -geometry +64+0 -composite ^
	( -clone 0 ) -geometry +128+0 -composite ^
	-background White -compose Over -layers flatten ^
	"%%i" ^
	-compose CopyOpacity -composite ^
	"a1\%%~nxi"
)

Re: Working with alpha channel

Posted: 2015-03-20T15:16:42-07:00
by snibgo
Escape the parentheses:

Code: Select all

   ^( -clone 0 ^) -geometry +1+0 -composite ^

Re: Working with alpha channel

Posted: 2015-03-20T23:53:59-07:00
by lorents
Thank you very much!

And the last question, how to make a picture like this?

Image

How can I change the background to a picture are not white, and black?

Re: Working with alpha channel

Posted: 2016-09-07T10:30:46-07:00
by lorents
Tell me, please, in the next issue.

There is the original image with an alpha channel.

Image

Tell me, how do I do it like this, while preserving the alpha channel of the image.

Image

Image

Re: Working with alpha channel

Posted: 2016-09-07T11:12:00-07:00
by snibgo
The main effect in the second is a shift-fill. That is, the image is placed over a copy of itself shifted in one direction, and this is repeated.

Here's the same image shift-filled downwards then right-wards:
Image

The first image looks like a blur-fill.

Re: Working with alpha channel

Posted: 2016-09-07T11:52:30-07:00
by lorents
I thank for the answer!
Prompt and whether it is possible to make so in images?