that was what I thought too, but its not working, do you've another idea?

cheers
froesi
Not without the exact command and error message.froesi wrote: that was what I thought too, but its not working, do you've another idea?![]()
Code: Select all
convert -size 1024x768 xc:white -font Helvetica -pointsize 80 \( -size 20x80 gradient:#FFFF00-#ff0000 -write mpr:grad -fill mpr:grad \) -strokewidth 5 -draw "text 20,80 'GRADSTROKE'" -delete 1 wallpaper_test.jpg
Hmm, this works (except that I gave it a different font):froesi wrote:mine fails too. (with no error message).Code: Select all
convert -size 1024x768 xc:white -font Helvetica -pointsize 80 \( -size 20x80 gradient:#FFFF00-#ff0000 -write mpr:grad -fill mpr:grad \) -strokewidth 5 -draw "text 20,80 'GRADSTROKE'" -delete 1 wallpaper_test.jpg
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -fill mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 gradstroke.png
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -fill #FFD505 -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 gradstroke.png
You don't tell us what is wrong. But I get an error (convert: no encode delegate for this image format `-fill'.) unless I put the color in quotes (-fill "#FFD505") or escape the # symbol (-fill \#FFD505).froesi wrote:Damn, nope, that was a stupid copy& paste error. I've
I forgot the -fill, the point is, that I want the gradient at the stroke.Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -fill #FFD505 -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 gradstroke.png
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 -fill \#FFFF00 -stroke none -draw "text 20,80 GRADSTROKE" gradstroke.png
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 -fill \#FFFF00 -stroke none -draw "text 20,80 GRADSTROKE" gradstroke.png
I'm not too clear on what you mean here about a "single new image". The gradient below is indeed a new image.froesi wrote:Thanks Rick, now I got the gradient, but I've my old problem, that the whole gradient won't be created as a single new image, and that the script starts at point y:0 to start for the gradient.
Okay. And with the above, the stroke DOES have the gradient, doesn't it? Sorry to seem dense. If possible, maybe you can attach a "hand-drawn" version of what you want.Now I have this line:
I want the text as a stroke -> the stroke should have the gradient.Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -write mpr:grad \) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 -fill \#FFFF00 -stroke none -draw "text 20,80 GRADSTROKE" gradstroke.png
Over the stroke I put the Text again.
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 \( -size 20x20 gradient:#FFFF00-#ff0000 -tile-offset +0+10 -write mpr:grad \) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 -fill \#FFFF00 -stroke none -draw "text 20,80 GRADSTROKE" gradstroke.png
Code: Select all
convert -size 1024x768 xc:white -draw 'affine 1,0,0,1,6,77 image Over 0,0 0,0 "bg.jpg"' -font FontName -pointsize 26 \( -size 20x60.359415458679 gradient:#FFFF00-#ff0000 -tile-offset +212.910275+123.908375 -write mpr:grad \) -stroke mpr:grad -strokewidth 8 -draw 'affine 2.2777137908936,0,0,2.2777137908936,212.910275,123.908375 text 5,26.52 "GRADSTROKE" ' -delete 1 -fill #FFFF00 -stroke none -draw 'affine 2.2777137908936,0,0,2.2777137908936,212.910275,123.908375 text 5,26.52 "GRADSTROKE" ' -draw 'affine 1,0,0,1,0,0 image Over 0,0 0,0 "mask.png"' image.jpg 2>&1
I'm confused by that statement because the code I posted above gives the following.froesi wrote: I tried this, but i won't work. It seems like the gradient is put over the whole image, not only over the text.
Code: Select all
-size 600x100 xc:white -font Helvetica -pointsize 80 ( -size 20x20 gradient:#FFFF00-#ff0000 -tile-offset +0+10 -write mpr:grad ) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 -fill #FFFF00 -stroke none -draw "text 20,80 GRADSTROKE" gradstroke.png
Code: Select all
convert -size 600x100 xc:white -font Helvetica -pointsize 80 -fill #ffff00 ( -size 1x63 gradient:#FFFF00-#ff0000 -tile-offset +0-20 -write mpr:grad ) -stroke mpr:grad -strokewidth 5 -draw "text 20,80 GRADSTROKE" -delete 1 gradstroke2.png
Code: Select all
-size 600x100 xc:white -font Helvetica -pointsize 80 -fill #ffff00 ( -size 1x63 gradient:#FFFF00-#ff0000 -tile-offset +0-35 -write mpr:grad ) -stroke mpr:grad -strokewidth 5 -draw "text 20,95 GRADSTROKE" -delete 1 gradstroke3.png
But I cannot test that, as I don't have your images "bg.jpg" or "mask.png". But no matter...Here again the code I use.
You tell me! Maybe I'm getting warm.I hope now you'll know what I mean
Right you are. That's what scripts are for. If you can manage Perl/PerlMagick or some other scripting language, you can probably do anything you wish. Otherwise, fonts are royal pain. Having to mess with pointsize makes it difficult to know the image sizes. You can avoid pointsize using the label: pseudotype bu then you can't use tiles! Maybe that will change one day.froesi wrote:Why do I cant say, write the gradient, then write again an internal image, where the text lies at point 0,0 --> put there the gradient into the stroke und all these image together put back into the big one at a certain position?
the problem is, if the text moves somewhere else in the image, you have to change the offset value too, I cant do that dynamicly in an easy way. The size of the textfont is changing too.
like you wrote, when you change the y value of your text you need to change the offset again.