RSS/Atom feed Twitter
Site is read-only, email is disabled

How to replace foreground with background pixels

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

How to replace foreground with background pixels rhimbo 30 Nov 20:31
  How to replace foreground with background pixels Michael Schumacher 30 Nov 20:57
   How to replace foreground with background pixels rhimbo 30 Nov 22:31
    How to replace foreground with background pixels rhimbo 30 Nov 22:41
     How to replace foreground with background pixels rhimbo 30 Nov 22:49
2019-11-30 20:31:07 UTC (over 4 years ago)
postings
13

How to replace foreground with background pixels

Hello all,

I've tried watching some YouTube tutorials to figure out my problem, and I've also done some searching but can't quite figure out how to accomplish my goal. I'm a novice still and part of my problem is that I'm not well-versed in graphics concepts, so I think I'm not comprehending some of the explanations.

I have several images which are just screen grabs or PDFs. For example, the one attached is from a PDF which contains annotations (red rectangle). I can import the PDF as a JPEG, that's no problem.

I'm trying to remove the red rectangle and in its place just have the "background" that was there before the red rectangle was added.

If someone could just point me in the right direction... a tutorial, part of the user's guide, whatever, I'm happy to go dive in.

Some of the YouTube tutorials showed adding layers, turning the image to gray scale or black-and-white, reversing foreground and background, etc. My head was spinning. They went kinda fast for a novie.

One of these days I'm going to start from the very beginning and learn this great tool from the perspective of concepts and formal immersion into the graphics world.

Many thanks in advance...

Attachments: * https://www.gimpusers.com/system/attachments/1306/original/Screen_Shot_2019-11-30_at_12.01.51_PM.png

rhimbo (via www.gimpusers.com/forums)
Michael Schumacher
2019-11-30 20:57:18 UTC (over 4 years ago)

How to replace foreground with background pixels

Am 30.11.19 um 21:31 schrieb rhimbo:

I'm trying to remove the red rectangle and in its place just have the "background" that was there before the red rectangle was added.

Trying a very non-complex approach:

Use the color picker tool to pick up the background color, then use the paint brush with an appropriately sized brush to paint over the rectangle.

Attachments:
* https://www.gimpusers.com/system/attachments/1306/original/Screen_Shot_2019-11-30_at_12.01.51_PM.png

For that image, the method above is quite fast, except for the area around the h in Cheers.

The text in the screenshots shows some sub-pixel hinting artifacts, for better screenshots it might be wise to turn subpixel hinting off before taking them, or make sure this is done by grayscale pixels only.

You should specify how many images your "several are", and how many annotations your are going to remove from each on average.

Also, avoid JPEG for anything but the final exports - using this format introduces artifacts around every edge, and will complicate your task needlessly.

--
Regards,
Michael
GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD

2019-11-30 22:31:36 UTC (over 4 years ago)
postings
13

How to replace foreground with background pixels

Am 30.11.19 um 21:31 schrieb rhimbo: Trying a very non-complex approach:

Use the color picker tool to pick up the background color, then use the
paint brush with an appropriately sized brush to paint over the rectangle.
For that image, the method above is quite fast, except for the area around the h in Cheers.

The text in the screenshots shows some sub-pixel hinting artifacts, for
better screenshots it might be wise to turn subpixel hinting off before
taking them, or make sure this is done by grayscale pixels only.

You should specify how many images your "several are", and how many annotations your are going to remove from each on average.

Also, avoid JPEG for anything but the final exports - using this format
introduces artifacts around every edge, and will complicate your task needlessly.

--
Regards,
Michael
GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD

Ah, thank you, Michael. By "several" I mean about 6 or 7 files... no big deal. In most of the files there is only 1 red rectangle.

One thing I forgot to ask... In another image I have (I attached a screen grab of part of the PDF), there is a dashed or dotted line in the original JPEG. I would like to "recover" the dashed line upon removal of the red rectangle that was drawn "above" it; that is, upon removing the red rectangle I would like the result to show the dashed line as if the red rectangle was never added.

How would I do this? I'm not sure how I would use the technique you suggested for this case.

Finally, what format do you suggest using other than JPEG?

Attachments: * https://www.gimpusers.com/system/attachments/1307/original/Screen_Shot_2019-11-30_at_2.28.28_PM.png

rhimbo (via www.gimpusers.com/forums)
2019-11-30 22:41:40 UTC (over 4 years ago)
postings
13

How to replace foreground with background pixels

Ah, thank you, Michael. By "several" I mean about 6 or 7 files... no big deal.
In most of the files there is only 1 red rectangle.

One thing I forgot to ask... In another image I have (I attached a screen grab
of part of the PDF), there is a dashed or dotted line in the original JPEG. I
would like to "recover" the dashed line upon removal of the red rectangle that
was drawn "above" it; that is, upon removing the red rectangle I would like the
result to show the dashed line as if the red rectangle was never added.

How would I do this? I'm not sure how I would use the technique you suggested
for this case.

Finally, what format do you suggest using other than JPEG?

Attachments: *
https://www.gimpusers.com/system/attachments/1307/original/Screen_Shot_2019-11-30_at_2.28.28_PM.png

I seem to recall I saw a YouTube video describing how to take part of an image and use it to overwrite another area of the image. But I just can't remember what term or vocabulary or terminology to use to search for that feature.

rhimbo (via www.gimpusers.com/forums)
2019-11-30 22:49:06 UTC (over 4 years ago)
postings
13

How to replace foreground with background pixels

I seem to recall I saw a YouTube video describing how to take part of an image
and use it to overwrite another area of the image. But I just can't remember
what term or vocabulary or terminology to use to search for that feature.

OK, I figured one thing out.... how to re-add the dotted line... 1. I selected the rectangle select tool. 2. I drew a rectangle around a section of the dotted line that remained. 3. I did a Copy.
4. I drew another rectangle around an area where I wanted the dotted rectangle, again using the rectangle select tool. 5. I did a Paste.
6. I adjusted the placement slightly.

This seemed to work. Although I'm not sure this is the "best practice."

rhimbo (via www.gimpusers.com/forums)