Hello, Gentlemen!
Could you please advise is it possible? An example - there's a chat screenshot with a lot of emojis, and I need to replace all occurances of one particular emoji (let's say devil) to another one (angel).Can it be automated?
Thanks a lot in advance!
Replace all occurance of an image with another one in a larger image.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Replace all occurance of an image with another one in a larger image.
That page tells you how to ask questions.
You should say what version of IM you use, on what platform. You should link to an example screenshot and what you want to search for and what you want to replace it with.
If you don't do this, we can only give vague answers.
See the very similar recent question: viewtopic.php?f=1&t=35163
You should say what version of IM you use, on what platform. You should link to an example screenshot and what you want to search for and what you want to replace it with.
If you don't do this, we can only give vague answers.
See the very similar recent question: viewtopic.php?f=1&t=35163
snibgo's IM pages: im.snibgo.com
-
- Posts: 4
- Joined: 2018-12-15T06:19:45-07:00
- Authentication code: 1152
- Location: Moscow, Russia
Re: Replace all occurance of an image with another one in a larger image.
Thank you snibgo. Now I understand.
Well, I'm OK to use any version on Windows 7, 64bit.
For the screenshots, it's now not that important as I've got an idea how search of sub-image works, but here they are:
Source image: https://schakal.ru/tmp/from.png
Subimage to search for: https://schakal.ru/tmp/find.png
Subimage to replace with: https://schakal.ru/tmp/with.png
Resulting image I expect to get: https://schakal.ru/tmp/to.png
The issue I still have is that I can't pass an output of 'compare' command to 'compose'. I've read some examples, but it seems that IM doesn't send output to console in usual way as most Windows command line programs do, so I can't save it to a file or variable or to pipeline it any further.
For example, classic output redirection doesn't work. IM still sends the output to the console and generates an empty file with no output:
Well, I'm OK to use any version on Windows 7, 64bit.
For the screenshots, it's now not that important as I've got an idea how search of sub-image works, but here they are:
Source image: https://schakal.ru/tmp/from.png
Subimage to search for: https://schakal.ru/tmp/find.png
Subimage to replace with: https://schakal.ru/tmp/with.png
Resulting image I expect to get: https://schakal.ru/tmp/to.png
The issue I still have is that I can't pass an output of 'compare' command to 'compose'. I've read some examples, but it seems that IM doesn't send output to console in usual way as most Windows command line programs do, so I can't save it to a file or variable or to pipeline it any further.
For example, classic output redirection doesn't work. IM still sends the output to the console and generates an empty file with no output:
Code: Select all
compare -metric RMSE -subimage-search from.png find.png tmp.png > tmp.txt
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Replace all occurance of an image with another one in a larger image.
Your links don't work for me. I get:
Images are sent to stdout. Text messages go to stderr, so use "2>tmp.txt".
Code: Select all
Error 1011 Ray ID: 489af3e98db134b2 • 2018-12-15 18:25:26 UTC
Access denied
What happened?
The owner of this website (schakal.ru) does not allow hotlinking to that resource (/tmp/from.png).
snibgo's IM pages: im.snibgo.com