any option for composition method of luminosity?
any option for composition method of luminosity?
convert test.psd[1] test.psd[2] -compose {what} -composite test.png
I find no "Luminosity" in the toturial:
http://www.imagemagick.org/Usage/compose/
can IM do it?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
Please define functionally what you want the luminosity compose method to do?
Re: any option for composition method of luminosity?
In Ps, I want to design a gradient with two color which they are only different with brightness,pls see below:
This type of gradient can be made by separating two layers which the top layer is blended with Luminosity.
I am trying to use ajax to generate the gradient which I only need to send the color value to php ,then the color and the overlay png will be composed to output a result png.
My english is poor, it is hard for me to describe a probem clearly, sorry for that.
This type of gradient can be made by separating two layers which the top layer is blended with Luminosity.
I am trying to use ajax to generate the gradient which I only need to send the color value to php ,then the color and the overlay png will be composed to output a result png.
My english is poor, it is hard for me to describe a probem clearly, sorry for that.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
try this as IM can create color gradients directly:
convert -size 25x256 gradient:"hsl(43%,50%,30%)-hsl(43%,50%,70%)" -rotate 90 result.png
or
convert -size 25x256 gradient:"hsb(43%,50%,30%)-hsb(43%,50%,70%)" -rotate 90 tmp2.png
not sure which colorspace results in the better gradient for you. But you can pick and vary the parameters.
Note I have converted your H from 155 to 43%=155/360 and randomly chose the Lightness/Brightness range from 30% to 70%
see
http://www.imagemagick.org/script/color.php
http://www.imagemagick.org/Usage/canvas/#gradient
convert -size 25x256 gradient:"hsl(43%,50%,30%)-hsl(43%,50%,70%)" -rotate 90 result.png
or
convert -size 25x256 gradient:"hsb(43%,50%,30%)-hsb(43%,50%,70%)" -rotate 90 tmp2.png
not sure which colorspace results in the better gradient for you. But you can pick and vary the parameters.
Note I have converted your H from 155 to 43%=155/360 and randomly chose the Lightness/Brightness range from 30% to 70%
see
http://www.imagemagick.org/script/color.php
http://www.imagemagick.org/Usage/canvas/#gradient
Re: any option for composition method of luminosity?
your reply is what I need ,this method is more convenient and faster than composing two png files. Thank you very much!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: any option for composition method of luminosity?
Gradient only generated a RGB color space, But with case you can generate HSL vaules in RGB colorspace, then tell IM it is really HSL.
See gradient in other colorspaces
http://www.imagemagick.org/Usage/canvas ... colorspace
I do something simular (but using separate channels) to generate a color wheel
http://www.imagemagick.org/Usage/channels/#colorwheel
See gradient in other colorspaces
http://www.imagemagick.org/Usage/canvas ... colorspace
I do something simular (but using separate channels) to generate a color wheel
http://www.imagemagick.org/Usage/channels/#colorwheel
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
By the way, here is how to do it with compositing two images that differ only in Brightness:
convert -size 25x256 xc:"hsb(43%,50%,30%)" xc:"hsb(43%,50%,70%)" gradient: -compose over -composite -rotate 90 result.png
the gradient mask controls the mixing of the two solid colors.
convert -size 25x256 xc:"hsb(43%,50%,30%)" xc:"hsb(43%,50%,70%)" gradient: -compose over -composite -rotate 90 result.png
the gradient mask controls the mixing of the two solid colors.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
Make sure you are using simple quotes and not curly quotes.
gradient: without any parameters creates a simple grayscale gradient from black (bottom) to white (top)
Please read http://www.imagemagick.org/Usage/canvas/#gradient
Also what version of IM are you using?
Note your black window showing your command has bad typing for the two xc: colors. You only have one xc: and the hsb(...) is not formatted as it should (see my command).
gradient: without any parameters creates a simple grayscale gradient from black (bottom) to white (top)
Please read http://www.imagemagick.org/Usage/canvas/#gradient
Also what version of IM are you using?
Note your black window showing your command has bad typing for the two xc: colors. You only have one xc: and the hsb(...) is not formatted as it should (see my command).
Re: any option for composition method of luminosity?
here i paste my code from bat file:
convert -size 25x256 xc:'hsb(43%,50%,30%)' xc:'hsb(43%,50%,70%)' gradient: -compose over -composite -rotate 90 result.png
pause
or
convert -size 25x256 xc:"hsb(43%,50%,30%)" xc:"hsb(43%,50%,70%)" gradient: -compose over -composite -rotate 90 result.png
pause
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
that is not what is showing in the first line of code in the black part of your picture.
try running the command outside a bat file, just paste it into a command window and see what happens.
what version of IM are you using?
identify -version
do you have libpng installed? try your output with .gif or .jpg in place of .png
try running the command outside a bat file, just paste it into a command window and see what happens.
what version of IM are you using?
identify -version
do you have libpng installed? try your output with .gif or .jpg in place of .png
Last edited by fmw42 on 2011-02-11T20:43:39-07:00, edited 1 time in total.
Re: any option for composition method of luminosity?
Last edited by linjuming on 2011-02-11T20:46:06-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
run this outside a bat file. run it directly by typing or pasting into a command window.
type
identify -version
to be sure of your version
type
identify -version
to be sure of your version
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
Windows has a convert function. Have you renamed IM's convert to something else to be sure you are running the correct convert?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: any option for composition method of luminosity?
try upgrading to the current version of IM 6.6.7.6