SOLVED - Stamping Image Ontop Of Other Images
SOLVED - Stamping Image Ontop Of Other Images
Hi there,
I'm very new (2 days experience) to this great tool so I apologise if this is simple. I've googled a lot to resolve it!
I'm trying to create a tool which will stamp a semi-transparent colour label on top of images which may be B&W, greyscale or colour of varying depths. When I use the code below it works for colour images ok, but for B&W it dithers it (unreadable) and for greyscale it is so faded it can't be seen. Here is the code:-
convert 13.tif label1.gif -set colorspace sRGB -gravity northwest -geometry +3+3 ^
-define compose:args=40,100 -compose dissolve -composite result.tif
convert result.tif result13.pdf
Thanks for any assistance,
Hunter
I'm very new (2 days experience) to this great tool so I apologise if this is simple. I've googled a lot to resolve it!
I'm trying to create a tool which will stamp a semi-transparent colour label on top of images which may be B&W, greyscale or colour of varying depths. When I use the code below it works for colour images ok, but for B&W it dithers it (unreadable) and for greyscale it is so faded it can't be seen. Here is the code:-
convert 13.tif label1.gif -set colorspace sRGB -gravity northwest -geometry +3+3 ^
-define compose:args=40,100 -compose dissolve -composite result.tif
convert result.tif result13.pdf
Thanks for any assistance,
Hunter
Last edited by mr_hunter on 2015-12-13T13:41:37-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: Stamping Image Ontop Of Other Images
What version of Imagemagick are you using?
Try
Why do you copy the output to a different name? Why not just use the final name in this line of code?
Can you post your input images to some place such as dropbox.com and put the URLs here?
Try
Code: Select all
convert 13.tif label1.gif -colorspace sRGB -gravity northwest -geometry +3+3 ^
-define compose:args=40,100 -compose dissolve -composite result.tif
Can you post your input images to some place such as dropbox.com and put the URLs here?
Re: Stamping Image Ontop Of Other Images
Hi there,
Thanks for the reply. Sorry for the delay - I was expecting the forum to email me notification of any replies.
I've tried what you sent and sadly it didn't work. I'm using ImageMagick-6.9.2-8-portable-Q16-x64.
I'll reply soon with a copy of the example images.
Thanks for your help!
Thanks for the reply. Sorry for the delay - I was expecting the forum to email me notification of any replies.
I've tried what you sent and sadly it didn't work. I'm using ImageMagick-6.9.2-8-portable-Q16-x64.
I'll reply soon with a copy of the example images.
Thanks for your help!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stamping Image Ontop Of Other Images
It should have notified you if you set your post or profile to send you email. Perhaps it went to your spam directory or was filtered to trash.
What does not work about the result?
An example with input images and what you expect for the output (at least a description) would be helpful.
If the image is already semi-transparent, then you could just use -compose over -composite, since the semi-transparency would act as the blending factor.
What does not work about the result?
An example with input images and what you expect for the output (at least a description) would be helpful.
If the image is already semi-transparent, then you could just use -compose over -composite, since the semi-transparency would act as the blending factor.
Re: Stamping Image Ontop Of Other Images
Here are the files...
2.tif - https://www.dropbox.com/s/c2o2f1xdf05jt9d/2.tif?dl=0
12.tif - https://www.dropbox.com/s/pocxn3jrc4t2i4r/12.tif?dl=0
label1.gif - https://www.dropbox.com/s/woydt9aaidmv5 ... 1.gif?dl=0
result_from_2.tif - https://www.dropbox.com/s/ubzrugwv9wew8 ... 2.tif?dl=0
result_from_12.tif - https://www.dropbox.com/s/he3bz2ge58c4l ... 2.tif?dl=0
2.tif - https://www.dropbox.com/s/c2o2f1xdf05jt9d/2.tif?dl=0
12.tif - https://www.dropbox.com/s/pocxn3jrc4t2i4r/12.tif?dl=0
label1.gif - https://www.dropbox.com/s/woydt9aaidmv5 ... 1.gif?dl=0
result_from_2.tif - https://www.dropbox.com/s/ubzrugwv9wew8 ... 2.tif?dl=0
result_from_12.tif - https://www.dropbox.com/s/he3bz2ge58c4l ... 2.tif?dl=0
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stamping Image Ontop Of Other Images
There seems to be a bug with bilevel tiff input. It works if you convert your 2.tif to 2.png.
I will report this on the bugs forum and see what they say.
Code: Select all
convert 2.tif 2.png
convert 2.png label1.gif -gravity northwest -geometry +3+3 ^
-define compose:args=80,100 -compose dissolve -composite 2_label1.tif
Re: Stamping Image Ontop Of Other Images
Thank you for fixing my issue and also logging the bug.
I'll try changing this post to solved - not used this forum before.
THanks again!
I'll try changing this post to solved - not used this forum before.
THanks again!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: SOLVED - Stamping Image Ontop Of Other Images
Not a bug. Just need to use -depth and -compress. See viewtopic.php?f=3&t=28820&p=128243#p128241
Re: SOLVED - Stamping Image Ontop Of Other Images
Hi there - sorry I'm pretty new to this and also for completeness for other people who have this issue. What would you recommend I change the code to to negate the need of converting to png first?
As I also need convert PDF's which are a hassle to convert to png and combine again?
THanks,
Neill
As I also need convert PDF's which are a hassle to convert to png and combine again?
THanks,
Neill