Help obtaining a specific texture effect
Help obtaining a specific texture effect
For the life of me, I cannot achieve through IM a texture effect similar to this (sorry for the somewhat big image, but I think it is needed to show exactly the effect I need):
This was obtained in Photoshop with those steps:
1. Create a texture in TIF format, 200x200px, 24bpp RGB, white (#FFFFFF) background, with text “© P.A.T.”, Font Arial Regular 48m anti-alias rounded, text color black (#000), rotation -45°
2. Apply that texture using Photoshop filter "Apply texture", resizing 200%, depth 3
I do know it is surely possible to do the same with IM, I saw the "texture" example at http://www.imagemagick.org/Usage/photos/#texture, but I simply fail. I seem to be unable to create a good texture to apply, since using the texture_fabric.gif from that example the effect is very good.
To complicate the issue further, I'd need to achieve this using only the convert command, not the composite one.
Could a good-hearted IM expert pull me out of this depth? Any help is REALLY appreciated!
Thanks,
Exilas
This was obtained in Photoshop with those steps:
1. Create a texture in TIF format, 200x200px, 24bpp RGB, white (#FFFFFF) background, with text “© P.A.T.”, Font Arial Regular 48m anti-alias rounded, text color black (#000), rotation -45°
2. Apply that texture using Photoshop filter "Apply texture", resizing 200%, depth 3
I do know it is surely possible to do the same with IM, I saw the "texture" example at http://www.imagemagick.org/Usage/photos/#texture, but I simply fail. I seem to be unable to create a good texture to apply, since using the texture_fabric.gif from that example the effect is very good.
To complicate the issue further, I'd need to achieve this using only the convert command, not the composite one.
Could a good-hearted IM expert pull me out of this depth? Any help is REALLY appreciated!
Thanks,
Exilas
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Help obtaining a specific texture effect
where does the background paper texture come from? how was it created? was an input image? where does the music come from? is that an input image? given the background paper texture, it should not be too hard to add the watermark text to it.
Please clarify what you are starting with image-wise?
Please clarify what you are starting with image-wise?
Re: Help obtaining a specific texture effect
Is it the embossed watermark you want?
From a previous thread which will give a starting point but it does use composite. The other method may be to have a standard mask already made.
From a previous thread which will give a starting point but it does use composite. The other method may be to have a standard mask already made.
Code: Select all
convert -size 400x200 xc:none -font Arial -pointsize 50 -kerning 1 -gravity center -fill black -annotate 330x330+0+0 "© P.A.T." -fill white -annotate 330x330+2+2 "© P.A.T." miff:- | composite - -dissolve 20% -tile input.jpg output..jpg
Re: Help obtaining a specific texture effect
@fmw42:
Thanks for your help. The original image is a scan of a music sheet. The addition to it I'm trying to recreate is the "© P.A.T." text applied diagonally. Note how it appears as engraved from below, since the original image is almost unchanged, as if it is retained over the engraving.
@Bonzo:
Thanks for your help. Unfortunately, your command doesn't create the same effect, since it appears as applied over the image, in white color that "fades" the underlying colors. In my sample image, this won't happen, take a look at the "agnus" word, fourth row, it is clearly readable over the applied "T".
Any further help very appreciated!
Thanks
Exilas
Thanks for your help. The original image is a scan of a music sheet. The addition to it I'm trying to recreate is the "© P.A.T." text applied diagonally. Note how it appears as engraved from below, since the original image is almost unchanged, as if it is retained over the engraving.
@Bonzo:
Thanks for your help. Unfortunately, your command doesn't create the same effect, since it appears as applied over the image, in white color that "fades" the underlying colors. In my sample image, this won't happen, take a look at the "agnus" word, fourth row, it is clearly readable over the applied "T".
Any further help very appreciated!
Thanks
Exilas
Re: Help obtaining a specific texture effect
I did not take the code very far as you said you could not use composite which my example uses. Are you now saying composite is OK?
Re: Help obtaining a specific texture effect
@Bonzo:
My understanding from reading the ImageMagick website is that there are ways to perform the "composite" transformations by using "convert" only, albeit with some limitations and/or tricks. Since I'm forced to use a tool that could invoke only the "convert" command of the ImageMagick suite, I'd really like "composite" to be avoided.
However, should I be able to reproduce the desired effect with "composite", I could consider a customization of the tool so it can use "composite" instead of "convert".
Of course, the "© P.A.T." texture creation could be made separately, so to have just a texture image to supply as input to convert/compose.
Again, thanks for your help!
Regards,
Exilas
My understanding from reading the ImageMagick website is that there are ways to perform the "composite" transformations by using "convert" only, albeit with some limitations and/or tricks. Since I'm forced to use a tool that could invoke only the "convert" command of the ImageMagick suite, I'd really like "composite" to be avoided.
However, should I be able to reproduce the desired effect with "composite", I could consider a customization of the tool so it can use "composite" instead of "convert".
Of course, the "© P.A.T." texture creation could be made separately, so to have just a texture image to supply as input to convert/compose.
Again, thanks for your help!
Regards,
Exilas
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Help obtaining a specific texture effect
see -compose modulate near the bottom of http://www.imagemagick.org/script/compose.php, but you must use -define to set the arguments. Also see http://www.imagemagick.org/Usage/compose/#watermark with its examples
The "© P.A.T." can be created as a separate image or use parenthesis processing in convert to create it on the fly. See http://www.imagemagick.org/Usage/basics/#parenthesis
The "© P.A.T." can be created as a separate image or use parenthesis processing in convert to create it on the fly. See http://www.imagemagick.org/Usage/basics/#parenthesis
Re: Help obtaining a specific texture effect
@fmw42:
The link to the page that shows how to substitute the composite command with the convert one is really useful, thanks, I missed it.
About the watermark examples page, I already tried those examples, but I cannot achieve my goal. Actually, as I said in the first post, it would seem to me that the most similar effect would be http://www.imagemagick.org/Usage/photos/#texture, but while I obtain a good enough effect using the texture_fabric.gif from that example, I'm at a loss in creating a "© P.A.T." texture that produces the same effect. BTW, creating a separate "© P.A.T." image would be just fine for my needs.
I'll experiment more, any further hint is welcome!
Regards,
Exilas
The link to the page that shows how to substitute the composite command with the convert one is really useful, thanks, I missed it.
About the watermark examples page, I already tried those examples, but I cannot achieve my goal. Actually, as I said in the first post, it would seem to me that the most similar effect would be http://www.imagemagick.org/Usage/photos/#texture, but while I obtain a good enough effect using the texture_fabric.gif from that example, I'm at a loss in creating a "© P.A.T." texture that produces the same effect. BTW, creating a separate "© P.A.T." image would be just fine for my needs.
I'll experiment more, any further hint is welcome!
Regards,
Exilas
Last edited by Exilas on 2011-11-29T11:17:25-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: Help obtaining a specific texture effect
Can you post a link to the background image onto which you want to add the watermark (prior to adding © P.A.T.)? The we might be able to show you the commands needed.
Re: Help obtaining a specific texture effect
@fmw42:
Unfortunately I do not have the non-textured music sheet image, however I applied the very same texture via Photoshop to a different image:
Original: (full image at http://i.imgur.com/RaOUW.jpg)
Textured: (full image at http://i.imgur.com/iQDnG.jpg)
Thanks,
Exilas
Unfortunately I do not have the non-textured music sheet image, however I applied the very same texture via Photoshop to a different image:
Original: (full image at http://i.imgur.com/RaOUW.jpg)
Textured: (full image at http://i.imgur.com/iQDnG.jpg)
Thanks,
Exilas
Last edited by Exilas on 2011-12-01T11:46:37-07:00, edited 1 time in total.
Re: Help obtaining a specific texture effect
Have a go with this:
You probably want a "rounder" font than arial and I am not sure how to get the water mark going up and not down !
There are lots of options to play with to alter the watermark and you could add two lots of text with one offset in the first part of code.
Code: Select all
convert -size 500x400 xc:none -font Arial -pointsize 80 -fill white -gravity northwest -annotate 400x400+30+0 "© P.A.T." -shade 120x40 miff:- | composite - -watermark 10% -tile RaOUW.jpg embossed.jpg
There are lots of options to play with to alter the watermark and you could add two lots of text with one offset in the first part of code.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Help obtaining a specific texture effect
Adding a bit to Bonzo's command and using convert only with tiling in memory. Try this and see if that is what you desire:
convert \( -size 500x400 xc:none -font Arial -pointsize 100 \
-fill white -gravity center -annotate -30 "© P.A.T." \
-blur 0x3 -shade 315x45 -write mpr:tile +delete \) -tile mpr:tile 1RaOUW.jpg -draw "color 0,0 reset" \
1RaOUW.jpg +swap -compose modulate -define compose:args=25 -composite 1test.png
see
http://www.imagemagick.org/Usage/canvas/#tile_memory
http://www.imagemagick.org/Usage/compose/#watermark
convert \( -size 500x400 xc:none -font Arial -pointsize 100 \
-fill white -gravity center -annotate -30 "© P.A.T." \
-blur 0x3 -shade 315x45 -write mpr:tile +delete \) -tile mpr:tile 1RaOUW.jpg -draw "color 0,0 reset" \
1RaOUW.jpg +swap -compose modulate -define compose:args=25 -composite 1test.png
see
http://www.imagemagick.org/Usage/canvas/#tile_memory
http://www.imagemagick.org/Usage/compose/#watermark
Re: Help obtaining a specific texture effect
@Bonzo & fnm42:
Once again thank you guys! We're really near to the goal, I'm trying to tweak the effect a little. Just a couple of questions:
1. How can I separate the texture production from the texture application? I tried to run separately the parethesized command to create a pat_im.png texture file, but it fails:
What is wrong?
2. Why the original filename 1RaOUW.jpg is repeated twice in the main command? Is there a way to use it only once? I ask because the tool that invokes the IM convert command passes the original filename just once.
Regards,
Exilas
Once again thank you guys! We're really near to the goal, I'm trying to tweak the effect a little. Just a couple of questions:
1. How can I separate the texture production from the texture application? I tried to run separately the parethesized command to create a pat_im.png texture file, but it fails:
Code: Select all
C:\tmp\0>convert -size 400x400 xc:none -font Arial -pointsize 100 -fill white -gravity center -annotate -45 "© P.A.T." -blur 0x3 -shade 315x45 -write mpr:tile +delete pat_im.png
convert.exe: missing an image filename `pat_im.png' @ error/convert.c/ConvertImageCommand/3016.
2. Why the original filename 1RaOUW.jpg is repeated twice in the main command? Is there a way to use it only once? I ask because the tool that invokes the IM convert command passes the original filename just once.
Regards,
Exilas
Last edited by Exilas on 2012-04-03T03:57:09-07:00, edited 1 time in total.
Re: Help obtaining a specific texture effect
Code: Select all
convert -size 400x400 xc:none -font Arial -pointsize 100 -fill white -gravity center -annotate -45 "© P.A.T." -blur 0x3 -shade 315x45 -write mpr:tile +delete
To save this image use:
Code: Select all
convert -size 400x400 xc:none -font Arial -pointsize 100 -fill white -gravity center -annotate -45 "© P.A.T." -blur 0x3 -shade 315x45 tile.png
Code: Select all
composite -watermark 10% tile.png -tile RaOUW.jpg embossed.jpg
Re: Help obtaining a specific texture effect
@bonzo:
Thanks, thanks, thanks! The output of your last commands is near enough to the goal to be ok. Just a tiny last step: could you help me to translate the last command
into an equivalent one using convert with just one occurrence of the RaOUW.jpg filename?
Regards,
Exilas
Thanks, thanks, thanks! The output of your last commands is near enough to the goal to be ok. Just a tiny last step: could you help me to translate the last command
Code: Select all
composite -watermark 10% tile.png -tile RaOUW.jpg embossed.jpg
Regards,
Exilas