Post Reply 

automatically (batch) replace a colour in hundreds of images

Oct 2, 2013, 21:43
Post: #1
automatically (batch) replace a colour in hundreds of images
Hi all,
I have hundreds of images that all have the same watermark (more or less but not exactly in the same place). It can easily be removed with the paint bucket with the default settings, the watermark is light grey, the pictures (JPGs) are black and white (a scanned book). But the sheer number of images makes it a gigantic effort to do it by hand. Any tips?

Thanks!
Find all posts by this user
Quote this message in a reply
Oct 2, 2013, 21:59
Post: #2
RE: automatically (batch) replace a colour in hundreds of images
I would use Imagemagick, but if the watermark is at different locations that could cause a problem.

http://www.imagemagick.org/Usage/photos/#removing
Find all posts by this user
Quote this message in a reply
Oct 2, 2013, 22:29
Post: #3
RE: automatically (batch) replace a colour in hundreds of images
(Oct 2, 2013 21:43)fnupfnup Wrote:  Hi all,
I have hundreds of images that all have the same watermark (more or less but not exactly in the same place). It can easily be removed with the paint bucket with the default settings, the watermark is light grey, the pictures (JPGs) are black and white (a scanned book). But the sheer number of images makes it a gigantic effort to do it by hand. Any tips?

Thanks!


"(scanned book)..."

So is the image your own, just of copyrighted print? You need to get permission from the owners of the pictures before you can publication either online or in print, you maybe ok leaving the watermark on as it gives them their credit.

Just what are you using these images for?
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 2, 2013, 22:55
Post: #4
RE: automatically (batch) replace a colour in hundreds of images
It's a book from Google books. The original book is free of copyright. The watermark was produced by a software used to convert this into a navigable html page. I would buy the software but it doesn't do a very good job, I had to spend quite some time to fix the result, time which I would have to spend again. I don't mind paying for software that works. If there is no easy solution, I might look for another way to separate the PDF into single JPGs without watermarks. I could also leave it as it is, since it's just cosmetic or do 30 images a day until I've done all 600+ images by hand.
Find all posts by this user
Quote this message in a reply
Oct 2, 2013, 23:22
Post: #5
RE: automatically (batch) replace a colour in hundreds of images
Ok, in that case, I would just leave the majority of the pages watermark intact, as it may be too much of a hassle to go through 600 images lol!

That still leaves the question of where your medium will be used maybe.

If you want to edit just a select few pages(highlights), that would be easier to do. Try Iwisthlers suggestion first.

Then if it doesn't quite work, IN GIMP;

try using the heal tool Heal similar to the clone tool but on steroids.
- Ctrl + click to define a source (pick the background) then click to heal the spot, you'll have to redefine the source when it runs out of background.
(you will see two cursors, look at where source is when painting)

Good luck!

"In order to succeed, your desire for success should be greater than fear of failure." BC
[Image: 29uocaf.png]
iFS007 tut vids on YT ~ auto color B&W landscape tut
Visit this user's website Find all posts by this user
Quote this message in a reply
Oct 3, 2013, 11:45 (This post was last modified: Oct 3, 2013 11:46 by rich2005.)
Post: #6
RE: automatically (batch) replace a colour in hundreds of images
Quote:... I might look for another way to separate the PDF into single JPGs without watermarks..

Just throwing an idea into the hat.

You can split up a PDF with imagemagick
Code:
convert -quality 100 -density 300x300 infile.pdf pages%3d.jpg
This produces a jpg image for each page. Heavy on the CPU, do not expect to break any speed records.
That might be sufficient, but if you want each image, a couple of possibilities

If the picture is in the same position on every page, it should be possible to add a '-crop' switch to the IM command line to crop it out.

If the picture(s) are surrounded by text then it might be possible to extract the images with the divide_scanned_images script. It would be very much try-and-see.
http://registry.gimp.org/node/22177

Here is a page from the old Gimp 1.01 manual split up with IM
The page is on the left side with the dividescannedimages dialog and the 3 separated images stacked on the right.
This was a on a single page, there is a batch mode.
[Image: PUxAq5D.jpg]

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  What in the heck is going on with my images? Braeden 1 294 Sep 4, 2018 19:22
Last Post: paynekj
  Possible to replace foreground with background? golden 1 337 Dec 4, 2017 12:07
Last Post: ythgilb
  Two 'halves' colour correction Supermandan1 2 470 Oct 10, 2014 12:05
Last Post: iForStyle007
  Exporting Multiple Layers Into Images (PNG, JPG, etc) SavingMultipleImages 17 11,931 Oct 6, 2014 10:59
Last Post: rich2005
  Calling 3rd party plugin for batch mode INV_SIG 3 556 Sep 24, 2014 09:09
Last Post: rich2005

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS