same command not the same transparent preview?

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?".
Post Reply
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

same command not the same transparent preview?

Post by linjuming »

cmd:
convert -size 1x250 gradient:black-none -fill "#143fae" -sigmoidal-contrast 6,50% -colorize 100% 3.png

tool url:
http://wirehopper.com/design/gradient.php


Image
Image
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: same command not the same transparent preview?

Post by anthony »

Check you IM versions that are installed on each machine. The bad one is probably very very old!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

my vesion is the latest vesion 6.7.0 q16
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: same command not the same transparent preview?

Post by fmw42 »

I tried your gradient from the reference page http://wirehopper.com/design/gradient.php and get exactly what IM produced. I don't see any stripes. Did you download the correct result.

From wirehopper:
convert -size 1x250 gradient:black-none -fill "#143fae" -sigmoidal-contrast 6,50% -colorize 100% 3.png

produces a solid blue line and should because you create a gradient, then sigmoid-contrast, and then colorize it 100% with #143fae. So the colorize wipes out all the gradient and overrides it with a solid color.
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

cmd:
convert -size 10x250 gradient:black-none -fill #143fae -sigmoidal-contrast 6,50% -colorize 100% 3_me.png

not the same? very strange

Image

Image

ps: the 3.png from wirehopper previewed in lister is the same with the top image which had point out, how can the web master create this gredient with php but can't me ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: same command not the same transparent preview?

Post by fmw42 »

something must be wrong with your bat file. as I am not windows user I cannot help. but the solid blue line is what you will get from that command. if you want something different, please explain and someone can probably give you the correct command line. If you just want a blue to transparent gradient, then just use:

convert -size 10x256 gradient:blue-none tmp.png
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

thank you, it seems not so perfect for windows .
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: same command not the same transparent preview?

Post by fmw42 »

linjuming wrote:thank you, it seems not so perfect for windows .

What command is not working correctly in Windows? How is it not correct or the same as what I specified? What is it that you really want for the result?

What is your exact version of IM?

convert -version


Do either of these produce what you want?

convert -size 10x256 gradient:blue-none tmp1.png
convert -size 10x256 gradient:none-blue tmp2.png
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

my purpose is to create the transparent png with the same preview effect what output with photoshop.
the im created png in my pc is transparent (can see the third img below) ,but can not see the transparent in lister. not the same preview with ps-done png.
not very serious problem ,can use in html will be ok.

vesion:
Image

run in bat
Image

show in html:
Image

ps output :
Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: same command not the same transparent preview?

Post by fmw42 »

try these:


convert -size 10x256 pattern:checkerboard gradient:blue-none -flatten tmp1.png

convert -size 10x256 pattern:checkerboard \( gradient:blue-none -channel a -level 30x100% +channel \) -flatten tmp2.png
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

o no ,you misunderstand the transparent for pattern:checkerboard,they are transparent,not checkbord.

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: same command not the same transparent preview?

Post by fmw42 »

you cannot create an image with a checkerboard to represent transparent and have the checkerboard removed when you overlay the gradient on some image. PS has two kinds of transparency -- background (shown as checkerboard) and alpha channel. IM only uses alpha channel transparency. Thus if you just want to have the image transparent use the original method.

convert -size 10x256 gradient:blue-none tmp1.png

If you need to show it represented with checkerboard behind it, then you have to flatten it together as in

convert -size 10x256 pattern:checkerboard gradient:blue-none -flatten tmp1.png

or

if in an HTML page, use a table cell with a checkerboard background and draw the first image above into the cell.
linjuming
Posts: 122
Joined: 2011-01-25T00:09:50-07:00
Authentication code: 8675308

Re: same command not the same transparent preview?

Post by linjuming »

you cannot create an image with a checkerboard to represent transparent and have the checkerboard removed when you overlay the gradient on some image. PS has two kinds of transparency -- background (shown as checkerboard) and alpha channel. IM only uses alpha channel transparency. Thus if you just want to have the image transparent use the original method.
Thank you, then I finally get the answer.
Post Reply