It is currently Tue Jul 02, 2024 2:22 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Using Gimp for screen captures
PostPosted: Tue Feb 16, 2021 1:24 pm  (#1) 
Offline
GimpChat Member

Joined: Feb 15, 2021
Posts: 6
GIMP Version: 2.10
Operating System: Windows
OS Version: Windows 10 Home
GIMP Experience: New User



At work, I used Snagit for all my screen capture needs and basic modifications. For the things I was doing, Snagit was more than enough so I got a copy for home as well.

However, now that I'm retired, I'm trying to learn how to do more advanced image modifications. Thought that using Gimp for screen captures would help me learn Gimp by forcing me to always go into it instead of Snagit.

One of the things I really liked about Snagit was the ability to take many screenshots in a row and it would automatically create a new file (using a naming template) and put it in a folder. That allowed me to go through a process and take a screenshot at each step without having to stop, go to a capture program, save file and then go back to what I was doing.

So my questions are:
1) Can Gimp be used to take screen shots?
2) If so, is there a way to configure it so it automatically saves each to a separate file?
3) If not out of the box, is that something that could be scripted? I haven't done anything with scripting in Gimp, but I have a lot of experience as a developer so I'm sure I can figure something out if it's possible.

Thanks in advance for any help.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Tue Feb 16, 2021 3:13 pm  (#2) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
Hmmm, Python in itself is rather powerfull and can probably doe what you described.
Bat the Python available in Gimp (after installation) is surely NOT containing the stuff you may need
(e.g. Flask and Flask_Admin, which probably could be used ...)

I think investing some (40) Euro for a professional version to get what you want ... my advice


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Tue Feb 16, 2021 3:16 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
viewtopic.php?f=23&t=7695#p99577

Using the PrtScr button shortcut, or Alt + PrtScr buttons shortcut, you could utilize a script to capture an entire screen or a window and designate a folder location.

Image

For a specific selected capture, GIMP might not be the answer. I use Nimbus and it sorts all my screenshots according to how I specify it to. See example below:

Image

The after the capture options:
Image

SaulGoode created a snapshot screenshot script years ago, that still works today, that will take a screenshot of your visible layer(s) in GIMP. I have attached that here, if you want to look at it for ideas.
Attachment:
sg-snapshot.scm [2.25 KiB]
Downloaded 128 times


So far Nimbus is free and does what I want, but you might need something more.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Tue Feb 16, 2021 5:15 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
The Linux distro I use already has an excellent screen capture utility included. You can set delay, include/exclude mouse and even have it open in Gimp automatically if you're too lazy to use paste. All you need to do is use the PrtScrn key.


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Wed Feb 17, 2021 6:45 am  (#5) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
Not Gimp, use IrfanView.

Attachment:
iview.jpg
iview.jpg [ 127.82 KiB | Viewed 6143 times ]


Set up output. Start. Minimise Iview. Use the hot key combo.

Edit:
That was a on the short side, As I see it the problem with using Gimp for screenshots is avoiding the screenshot dialogue, making use very tedious
Set up the delay, start, minimise Gimp, Gimp pops up, export the screenshot.

There is a pdb for screenshot and in linux a command such as gimp -b '(plug-in-screenshot 0 FALSE 0 0 0 0 0)' will open Gimp with the screenshot dialogue, but then you still have to go through the start / minimise / export procedure.
Not very convenient for an an easy workflow.
Might be possible in a script to, export / close Gimp as well. Maybe one of the clever guys can tell you.

_________________
Image


Last edited by rich2005 on Wed Feb 17, 2021 7:39 am, edited 3 times in total.

Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Wed Feb 17, 2021 7:22 am  (#6) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7744
Location: On the other side of this screen
I find print screen is quicker and then you can edit it to how you want, after Printing Screen 'paste as a new image' in Gimp.

_________________


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Mon Mar 08, 2021 9:04 am  (#7) 
Offline
GimpChat Member

Joined: Feb 15, 2021
Posts: 6
Thanks for the replies, everyone.

After doing some more playing around and research, I decided to go with Greenshot because it gives me the ability to do screen captures of the whole screen or just a region, automatically save each screenshot using a file-naming template. Then, for those I want to edit, I just open the files in Gimp.

Greenshot works almost exactly as Snagit (but it's FREE) and Gimp is now my "editor" for images instead of using Snagit Editor. I know I can do a lot more with Gimp than Snagit Editor, but it's a steep learning curve right now.

One thing I'm struggling with now is how to simply highlight part(s) of an image. My main use case for this is simulating using a yellow highlighter to highlight a portion of text on the image. Doing a search in the community on this resulted in some hits showing how to do it by drawing a rectangle, then filling it, and using transparency for that rectangle. I haven't gotten that to work perfectly yet, but even if I did, I wonder if there is a simpler way. I was hoping there would actually be a highlight tool.

Anyone else have this requirement? How are you doing it?


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Mon Mar 08, 2021 10:55 am  (#8) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
All depends on the image but for regular black text on white then suitable brush and size-to-suit / pencil tool / Mode = Burn in the tool options. Click, hold shift, move tool pointer, click again for straight lines.

Attachment:
highlight.jpg
highlight.jpg [ 153.22 KiB | Viewed 5549 times ]


Experiment with the tool modes.

_________________
Image


Top
 Post subject: Introducing HighlightText.scm 1.0
PostPosted: Thu Nov 11, 2021 8:44 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Hello IMZvonko

According to the rich2005's solution above, if you choose a circular brush of the size of the height of the text, you can burn the background in yellow with a rounded corner-like effect at the beginning and the end of the straight line drawn by :pencil

Let us suppose that you do not wish to change the current color of the pencil or the brush.
IMZvonko wrote:
I wonder if there is a simpler way.

  1. Click the Rectangle Select Tool :rectsel
  2. Check (or not) the option [x] Rounded corners in the Tool Options
  3. Select the text to be highlighted in the image
  4. DbClick the Gimp menu "Highlight" at the right of the "Help" menu

The text "Greenshot" has been highlighted by Greenshot with a rectangular selection.
Image
Other yellow highlighted texts have been emphasized by Script-Fu HighlightText.scm :mrgreen:

Attachment:
HighlightText.zip [1.65 KiB]
Downloaded 34 times

  1. Download the zipped archive HighlightText.zip 2KB
  2. Unzip HighlightText.zip to generate HighlightText.scm 4 KB
  3. Optionally read MIT-like licence minus commercial use at the end of the .scm
  4. Copy HighlightText.scm in C:\Users\YourUserName\AppData\Roaming\GIMP\2.10\scripts\
  5. Restart Gimp
:arrow: The Gimp menu "Highlight" should appear after the "Help" menu.

Let us comment the main lines of code in Script-Fu:
IMZvonko wrote:
drawing a rectangle

let* defines the local variables:

Let us retrieve the rectangular selection: :rectsel
(boundSel   (cdr (gimp-selection-bounds image)))


LAYER-MODE-MULTIPLY will burn the background.
(layerHiT   (car (gimp-layer-new image widthSel heightSel RGB-IMAGE "HighlightTxt" 100 LAYER-MODE-MULTIPLY)))


in yellow: :paint
(gimp-context-set-foreground "#ffff00") ; yellow


IMZvonko wrote:
then filling it

(gimp-edit-bucket-fill-full layerHiT BUCKET-FILL-FG 0 100 0 FALSE TRUE 0 0 0)


IMZvonko wrote:
and using transparency for that rectangle.

(gimp-drawable-fill layerHiT TRANSPARENT-FILL)


Related topic: Gimp menu "DX" > "Highlight selected area..."
github: DX Screenshot

Fix the original condition that displays a warning:
(if (= (or draw-border fill-area) FALSE) (gimp-message "Nothing to do - check 'Draw border' and/or 'Fill area'."))

by:
(if (and (= draw-border FALSE) (= fill-area FALSE)) (gimp-message "Nothing to do - check 'Draw border' and/or 'Fill area'."))

TRUE is the numeric value 1 but not a boolean: :huh

:keybdtype Copy and paste in the Script-Fu console then validate by the 'ENTER' key.
(or FALSE TRUE)

;-> 0 is displayed by the Script-Fu console

Disjunction of opposite boolean values: :geeking
(or #f #t)

;-> #t


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Thu Nov 11, 2021 5:41 pm  (#10) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
Hmm. So instead of few steps using the UI, one has to type arcane commands that can backfire. And this is "simpler"?

_________________
Image


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Fri Nov 12, 2021 3:32 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 790
Location: SEA - South East Asia
ofnuts wrote:
Hmm. So instead of few steps using the UI, one has to type arcane commands that can backfire. And this is "simpler"?

:rofl
I cannot agree more, this sounds extremely daunting and exhausting just for a screenshot.

BTW I'm using Ksnip (sudo apt install ksnip), crossplatform over there -> https://github.com/ksnip/ksnip
It has all the tools needed like aut-numbering, arrows, double arrows, rectangle, circle, annotation, highlight, blur, pixelize, and so, and so, also like draw a rectangle to screenshot that part, it recall always your last setting, and so much more like opening a png or jpg independently to put arrows or whatever you want.

a screenshot of that screenshot app :hehe
Attachment:
screenshot_20211112-162528.png
screenshot_20211112-162528.png [ 282.84 KiB | Viewed 1826 times ]

_________________
Patrice


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Fri Nov 12, 2021 10:00 am  (#12) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
I use a free version of PhotoScape X for windows.http://x.photoscape.org/

_________________
https://www.deviantart.com/pocholo17
Image


Top
 Post subject: Reductio ad absurdum
PostPosted: Fri Nov 12, 2021 3:06 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
PixLab wrote:
:rofl
I cannot agree more, this sounds extremely daunting and exhausting just for a screenshot.

PixLab, it's not even "just for a screenshot" :lmao
but for highlighting text with a yellow background, aka annotation.
Into the bargain, the subject is "Using Gimp" :gimp but not an external tool such as GreenShot.

However, according to proof by contradiction,
AlSchemist will supply the usage with the external tool GreenShot quoted by IMZvonko for comparison.
Let us suppose that "to simplify" ;) the screen capture or any image is already loaded inside Gimp.

  1. In Gimp, press Ctrl+C to copy the picture in the clipboard
  2. Click the GreenShot's green icon in the taskbar
  3. Click the contextual menu "Open image from clipboard"
  4. In Greenshot, select the Highlight (H) tool in the left margin
  5. Draw a rectangle around the wished text: it is not possible to make rounded corners.
  6. Press Shift+Ctrl+C to export the highlighted image in the clipboard
  7. Come back into Gimp and press Ctrl+V to paste the highlighted image from the clipboard
  8. Click outside the image to merge the "Floating Selection (Pasted Layer)"

Alternatively GreenShot would be able to run Gimp but the loading of Gimp would be too slow.

With the Script-Fu HighlightText.scm script in Gimp:
AlSchemist wrote:
  1. Click the Rectangle Select Tool :rectsel in the Toolbox
  2. Select the text to be highlighted in the image
  3. Click slowly twice the Gimp menu "Highlight" at the right of the "Help" menu

:yesnod What was missing in the AlSchemist's very long post is the [spoiler]...[/spoiler] tag to hide the waffles. :abduct

:arrow: HighlightText.scm is for beginners who wish to learn not :nono Python :oops: but :lp :borg gimpy ana--thema--tized Scheme :bigthup of course without changing the settings of the :pencil


Top
 Post subject: Re: Using Gimp for screen captures
PostPosted: Fri Nov 12, 2021 6:39 pm  (#14) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
Ah, that was a script.... Btw, no need to restart Gimp after installing a script-fu, just do "Filters > Script-fu > Refresh scripts"

Let us suppose that "to simplify" ;) the screen capture or any image is already loaded inside Gimp

Of course not. The deal in that case is that you can do everything without using Gimp.

This said to highlight something in yellow in Gimp, set your FG to yellow, your brush to Multiply mode, adjust the size of the brush, then:

1. Click on the start of the highlighted text
2. Depress shift, and move to the end of the text (you can in addition depress Control to make sure the highlighting is horizontal) then click again.

Of course, you can save your brush settings as a preset:

Attachment:
BrushPreset.png
BrushPreset.png [ 14.64 KiB | Viewed 1771 times ]


So highlighting is just restoring the preset and a couple of clicks.

_________________
Image


Top
 Post subject: Re: Reductio ad absurdum
PostPosted: Sat Nov 13, 2021 2:07 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 790
Location: SEA - South East Asia
AlSchemist
www.youtube.com Video from : www.youtube.com

Sorry, I felt I was obliged to do it :hehe

More seriously (but not so ;) ) let's get back on track.
AlSchemist wrote:
PixLab wrote:
:rofl
I cannot agree more, this sounds extremely daunting and exhausting just for a screenshot.

PixLab, it's not even "just for a screenshot" :lmao
but for highlighting text with a yellow background, aka annotation.
Into the bargain, the subject is "Using Gimp" :gimp but not an external tool such as GreenShot.

So it's even worse than I thought....
Not only you are cluttering the top menu with a script that needs 1 more click than doing it WITHOUT script, but also that person will not learn GIMP properly nor use the proper tool to do it.

AlSchemist wrote:
However, according to proof by contradiction,
AlSchemist will supply the usage with the external tool GreenShot quoted by IMZvonko for comparison.


So to highlight something on a screenshot in GIMP the OP will always be dependent of you?

AlSchemist wrote:
Let us suppose that "to simplify" ;) the screen capture or any image is already loaded inside Gimp.

  1. In Gimp, press Ctrl+C to copy the picture in the clipboard
  2. Click the GreenShot's green icon in the taskbar
  3. Click the contextual menu "Open image from clipboard"
  4. In Greenshot, select the Highlight (H) tool in the left margin
  5. Draw a rectangle around the wished text: it is not possible to make rounded corners.
  6. Press Shift+Ctrl+C to export the highlighted image in the clipboard
  7. Come back into Gimp and press Ctrl+V to paste the highlighted image from the clipboard
  8. Click outside the image to merge the "Floating Selection (Pasted Layer)"


Oh my... you're not simplifying, at all!
BTW your Click outside the image to merge the "Floating Selection (Pasted Layer) is wrong! clicking outside the image will NOT merge the pasted/floating selection (and happily it does not do this!)

Also I just learn that on Windows OS when you hit the "PrintScreen / PrtScr" key, Windows copy it to the clipboard (yeah.. I needed to do some searches -> I'm using only Linux)
Attachment:
screenshot_20211113-143502.png
screenshot_20211113-143502.png [ 97.33 KiB | Viewed 1755 times ]


In the end why all those copy/paste and back and forth between greenshot and gimp?
Why not Highlight directly in GIMP as the OP asked?
Hit that "PrintScreen / PrtScr" key = clipboard, then in GIMP > File/Create/From clipboard, then >> New layer in multiply mode >> make your selection >> drag n drop the color from FG or BG >> DONE! and this method can protect from mistakes as well...
Or use the brush as suggested by @Ofnuts, big advantage of Ofnuts brush, you got a preset that you just call once and highlight as many time as you need just with a brush, also next time when you re-open GIMP it's there and accessible in just 1 click.

AlSchemist wrote:
Alternatively GreenShot would be able to run Gimp but the loading of Gimp would be too slow.

With the Script-Fu HighlightText.scm script in Gimp:
  1. Click the Rectangle Select Tool :rectsel in the Toolbox

OK, it's a GIMP native tool
AlSchemist wrote:
  • Select the text to be highlighted in the image

  • OK, it's a GIMP native tool
    AlSchemist wrote:
  • Click slowly twice the Gimp menu "Highlight" at the right of the "Help" menu

  • No script needed for that >> Just drag n drop the FG or the BG color on the image...
    Oh you DO NOT EVEN NEED to drop it in the selection as it will fill ONLY the selection and if you use the multiple selection mode (addition/add) it will fill all at once, :bigthup

    AlSchemist wrote:
    :yesnod What was missing in the AlSchemist's very long post is the [spoiler]...[/spoiler] tag to hide the waffles. :abduct

    :arrow: HighlightText.scm is for beginners who wish to learn not Python but gimpy ana--thema--tized Scheme of course without changing the settings of the :pencil

    OK that's nice, as an exercise it can be good to learn tiny script, :bigthup
    but as a utility script, no, it's not even re-inventing the wheel, it's making things more complex as they should be.

    _________________
    Patrice


    Top
     Post subject: Auto-numbering
    PostPosted: Sat Nov 13, 2021 9:54 am  (#16) 
    Offline
    GimpChat Member
    User avatar

    Joined: Oct 23, 2021
    Posts: 67
    It's amazing how around twenty tiny lines of Scheme could generate as secondary effects.

    PixLab, AlSchemist particularly appreciated the pythonesque quote of the movie! :evilgrin :sfight :sword
    Into the bargain, you mentioned about ksnip the key feature of auto-numbering enough interesting also in GreenShot.

    Attachment:
    MarkNbrCirclePathTool.png
    MarkNbrCirclePathTool.png [ 178.26 KiB | Viewed 1723 times ]


    Ten years ago, Silas Silva created mark-number-circles.scm in github under GNU license.
    In the 2021 version, some original "TODO" have been fixed by AlSchemist.

    Attachment:
    mark-number-circles.zip [2.24 KiB]
    Downloaded 39 times

    Usage:
    1. After unzipping, copy mark-number-circles.scm 5 KB in C:\Users\YourUserName\AppData\Roaming\GIMP\2.10\scripts\
    2. Restart Gimp
    3. Draw two or more points with the Paths Tool :pathtool
    4. Click the Rectangle Select Tool :rectsel
    5. Gimp menu "Filters" > "Render" > "Mark Number Circles"
    :arrow: Each point of the path will be replaced with a incremented number inside a circle.

    Hereafter enclosed is the process of migration in Gimp 2.10.28 because in the decade, some API were deprecated.
    The original gimp-path-get-points is "deprecated: Use 'gimp-vectors-stroke-get-points' instead." says PDB aka Gimp Procedure DataBase.
    The old API generated a longer vector translated into a list, hence:
    ; Other itens are repetitive for us, so drop it.
    (set! lis (drop lis 9))

    About the drop function, Silas indicates:
    ; Quick (and dirty?) implementation of the drop function of SRFI 1 extensions to Scheme,
    ; not implemented in TinyScheme (the interpreter used by Gimp).
    ; It drops n elements of the list and returns the rest.

    It is the very first time that the abbreviation SRFI 1 standing for Service Request Feature for Implementation is ever written in GimpChat.
    Hope that AlSchemist will be not burnt alive on the stake for this taboo.
    That is why the function drop of SRFI 1 has been dropped in the 2021 version of mark-number-circles.scm.

    After all, for numbers in circle, there is SRFI 14 Unicode Character-Set.
    Attachment:
    SRFI14CharSet.png
    SRFI14CharSet.png [ 38.14 KiB | Viewed 1723 times ]

    To be continued.


    Top
    Post new topic Reply to topic  [ 16 posts ] 

    All times are UTC - 5 hours [ DST ]


       Similar Topics   Replies 
    No new posts The old the-BRL-box-is-too-big-for-my-screen problem

    9

    No new posts Attachment(s) Can't Get GIMP to Be Full Screen

    8

    No new posts 17,3" LAPTOP SCREEN

    10

    No new posts Old Disney technology re-discovered; superior to green screen.

    3

    No new posts Using Gimp clone tool on surface book tablet (screen detached frm keyb

    2



    * Login  



    Powered by phpBB3 © phpBB Group