Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
bil80
Posts: 2 Joined: 2014-04-02T02:55:05-07:00
Authentication code: 6789
Post
by bil80 » 2014-04-02T03:05:31-07:00
I am not an expert in ImageMagick, and i want to make an image transparent with gradient effect as on Photoshop:
Transparency effect with Photoshop:
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2014-04-02T03:37:21-07:00
Windows BAT syntax:
Code: Select all
convert ^
clooney.jpg ^
( +clone ^
-sparse-color barycentric "0,0,white %%[fx:w-1],0,white 0,%%[fx:h-1],black %%[fx:w-1],%%[fx:h-1],black" ^
) ^
-compose CopyOpacity -composite ^
c.png
bil80
Posts: 2 Joined: 2014-04-02T02:55:05-07:00
Authentication code: 6789
Post
by bil80 » 2014-04-02T07:39:32-07:00
Yes thanks a lot !
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2014-04-02T18:25:57-07:00
My solution was over-complex. I had forgotten that barycentric can work with just two coordinates:
Code: Select all
convert ^
clooney.jpg ^
( +clone ^
-sparse-color barycentric "0,0,white 0,%%[fx:h-1],black" ^
) ^
-compose CopyOpacity -composite ^
c.png