Author Topic: GIMP 2.8.2 - Basic questions  (Read 57052 times)

0 Members and 2 Guests are viewing this topic.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
GIMP 2.8.2 - Basic questions
« on: September 13, 2012, 06:14:11 pm »
Okay, so taking GSA's advice, I've decided to give GIMP a try as my main mapping program. However, seconds after opening a file, I'm already frustrated by the apparently convoluted method needed to simply paste an image from the clipboard while removing a specific colour making the removed portion "transparent".

As I'm fond of saying, MS Paint is great because it's fast. I always use #FF00FF as the "transparent" colour of every file I save. When I'm pasting lots of images like sprites or anything where a portion must be transparent, I only need to make #FF00FF the background colour, select the "Transparent Background" icon and anything I paste will have that colour disappear.

From the various tutorials I've read about GIMP, I'd need to select and then remove the background colour every time I paste a selection. Isn't there an easier way? How hard can simply pasting something correctly be?

Seriously, I'm already willing to pull the plug right there with using GIMP as my primary paint program. I'm probably going to do like Peardian and do more of my work in Paint with the final assembly taking place n GIMP.
« Last Edit: September 13, 2012, 09:34:24 pm by TerraEsperZ »
Current project:
Mega Man: Powered Up (PSP)

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #1 on: September 13, 2012, 09:50:31 pm »
It's not harder, but there's a paradigm shift you need to get used to.

The thing you need to know is: In GIMP, "transparent" is not a color, it's a channel. So, instead of having 3 channels (Red, Green, Blue), you have 4 (Red, Green, Blue, Alpha).
This brings a few advantages.
  • First, you don't need to dedicate a color to "transparent" and you don't need to worry having that color elsewhere in the image becoming transparent by mistake.
  • Second, this allows for 256 levels of semi-transparency independent of the color. So you can have:
    50% opaque white (#FFFFFF-7F),
    50% opaque black (#000000-7F),
    75% opaque blue (#0000FF-BF),
    100% opaque purple (#FF00FF-FF),
    0% opaque purple (#FF00FF-00),
    0% opaque red (#FF0000-00)
    and 4,294,967,290 other combinations.
  • Third, because you can have 100% transparent colors, and because colors aren't lost, you can "anti-erase" back to what something was before being erased. That's pretty cool.

To answer your question, all you need to do is: Instead of saving your images with a purple background (#FF00FF-FF), just save them with a transparent background (#xxxxxx-00)! PNG supports having an alpha channel. (See the sprite I attached for reference.)

Just to make sure I'm clear:
Your "Before" technique: Open an image, select "purple" as your active color, pick the paint bucket tool, click the background, save.
What your "New" technique should be: Open an image, pick the "magic wand" or "color picker" tool, click the background, press "Delete", save.

Then, when you'll paste stuff, it'll work exactly the same way.

Unfortunately however, GIMP won't be that great for your old files with purple background.

I hope this solves your issue. If there is anything else, just say so.

NB: If delete doesn't work (ie: you see no checkered background), that's because your image doesn't have an alpha channel. You need to add one by doing: Layer -> Transparency -> Add Alpha Channel. There is no shortcut by default but I highly recommend setting one up.
« Last Edit: September 13, 2012, 10:10:05 pm by GSA »

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
Re: GIMP 2.8.2 - Basic questions
« Reply #2 on: September 14, 2012, 10:36:53 am »
This is how it works with Paint.NET as well.  I'm not sure what kind of tools GIMP has, but in Paint.NET you can use the magic wand to select the background color then hit delete key and it will change the selection to transparent.  Most newer programs don't support the type of masking that MSPaint supported, and you'll need to start thinking in layers as well as using a transparent color for your background.

I stuck with MSPaint for quite a while when doing sprite or mapping stuff, and it's a bit of a pain to start with something new at first.  But it's worth it.  Mapping is much easier with layers.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: GIMP 2.8.2 - Basic questions
« Reply #3 on: September 14, 2012, 03:51:30 pm »
Sorry for the irritated tone in my opening post by the way. I'd really like to move from MS Paint but it's really aggravating when more modern programs make you jump through hoops to accomplish things that used to be so simple before.

And I perfectly understand the necessity for layers, I really do. I've become very efficient in MS Paint to end up with the results I get, and some things have become almost second nature to compensate for the lack of certain functions like "snap-to-grid" for example. But having layers to keep everything separated would be *so* nice.

But it just seems like a pain to think that I'll need to select and erase the background colour every time I paste a screenshot on a layer. I'd basically be forced to go from a simple keyboard shortcut (Ctrl + V) to that same shortcut *plus* clicking the [Select By Colour] tool, clicking the offending colour and pressing DELETE. It's not that much longer or harder for a single screen, but it's 4 or 5 times longer than with MS Paint. Doing this with hundreds of screen captures simply isn't efficient, which isn't to say that I see no value in using GIMP.

The ability to select by individual colour would eliminate my need for another program which I use almost exclusively for that. Also, alpha channel transparency would make certain effects much easier to pull off than with Paint Shop Pro 8 which didn't feature an alpha channel (I had to make do with a mask layer which complicated things a little).

Since GIMP seems to support scripts of some kind (haven't checked that part in detail), I wonder if it wouldn't be useful for me to see about making a script that would let me paste the content of the clipboard, then add an Alpha channel to the selection if there isn't one and assign an Alpha value of 0 to all the pixels that are of the current background colour. Otherwise, I'll still have to assemble the bulk of each layer in Paint and *then* do the actual layering in GIMP. I'm positive that would be faster in the long run.

This wouldn't be a problem for me. I'm used to having to rely on different programs when a single one doesn't do everything I need it to.
Current project:
Mega Man: Powered Up (PSP)

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #4 on: September 14, 2012, 09:34:54 pm »
But it just seems like a pain to think that I'll need to select and erase the background colour every time I paste a screenshot on a layer. I'd basically be forced to go from a simple keyboard shortcut (Ctrl + V) to that same shortcut *plus* clicking the [Select By Colour] tool, clicking the offending colour and pressing DELETE.

There is something I don't understand.

You said that you save your images with a purple background... But that purple background isn't there by default, right? You need to paint it.
Why can't you replace that step with "deleting the background" instead?

I don't see where there would be additional steps, it's just replacing one step with another.

Offline TerraEsperZ

  • Hero Member
  • *****
  • Posts: 2326
Re: GIMP 2.8.2 - Basic questions
« Reply #5 on: September 14, 2012, 10:43:23 pm »
Several emulators allow you to disable individual layers, with the empty portions being replaced with either the overscan colour (the first colour entry of the first layer I believe) or the colour value of your choice. That means that when I'm capturing, let's say, the foreground of a stage, I'll end up with dozens if not more of screenshots with (hopefully) a unique colour value representing the "empty" area where another layer might show through.

So, it wouldn't be a problem for the elements I wish to keep aside like individual layers, sprites, fonts, tiles, etc, because I'm already processing them a bit before saving them. It's the dozens/hundreds/thousands of potential screen captures that need to have their background removed that would slow me down. That's why I'm thinking that the initial assembly would be quicker to do in MS Paint because every time I paste a shot the colour of my choice is automatically removed, leaving a transparent selection I can place anywhere with ease.

I really appreciate your help so don't take my whining personally. Sometimes I think I might just be a relic of a simpler time. I remember when I asked Peardian how to texture a bunch of polygons for a map. I was expecting something simple like "select polygon" and "assign texture" which would stretch the image to fill said polygon. But no, there's all this stuff about objects, materials, UV mapping, texture modes and offsets, anti-aliasing, lighting and who knows what else. It feels like needing to learn all about chemistry and molecular physics before being allowed to simply bake a cake using cake mix. Powerful tools are great to do complex work, but they suck when you just want to do something really simple.
Current project:
Mega Man: Powered Up (PSP)

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #6 on: September 14, 2012, 11:25:06 pm »
OK, I understand the problem for the screen captures assembly. But then, why don't you do this?

1- Assemble your screen captures while keeping the overscan color there.
2- Erase the overscan color only after everything* is assembled, so you only have to do it once.

*Edit for clarity: When I say "everything", I mean "the whole foreground of a given level".
« Last Edit: September 18, 2012, 12:32:45 am by GSA »

Offline Troy Lundin

  • Full Member
  • ***
  • Posts: 145
Re: GIMP 2.8.2 - Basic questions
« Reply #7 on: September 17, 2012, 09:53:04 pm »
If he doesn't remove the overscan color on each screencap, then it will overlap the main image. It has to be done for each screencap.

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #8 on: September 18, 2012, 12:29:10 am »
If he doesn't remove the overscan color on each screencap, then it will overlap the main image. It has to be done for each screencap.

What do you mean by "main image"?
  • If you mean the final render with the background, then you missed step #2 from my previous post. (Don't forget that GIMP has a color picking tool allowing to change a whole color in one click.)
  • If you mean the current layer you are assembling (foreground), then, as far as I know, this overlap isn't a problem. (Or if it is, could you provide a set of screenshots where this is the case?)

PS: I attached an image showing what I mean.
« Last Edit: September 18, 2012, 02:22:16 am by GSA »

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
Re: GIMP 2.8.2 - Basic questions
« Reply #9 on: September 18, 2012, 05:53:39 pm »
Troy's right. My regular routine is
1) snap a screenshot
2) paste it into PS
3) crop off the black bars on the top and bottom of the screenshot
4) position the screenshot

Eventually I remove the background all at once, but step 3 is what Terra really wants to avoid. I usually end up doing it manually since I like mapping as I play, but if I take a million screenshots up front, I can crop them with a small shell script all at once and then happily place them all without step 3.

Offline Troy Lundin

  • Full Member
  • ***
  • Posts: 145
Re: GIMP 2.8.2 - Basic questions
« Reply #10 on: September 18, 2012, 11:12:00 pm »
PS: I attached an image showing what I mean.

I've always giggled at the selection lines when selecting a color. I know, I'm weird. :D

Edit: I understand what everyone is saying. Using the GIMP method, you would have to capture each layer separately, so that you can layer them in GIMP. With the screenshot method, you could just have the sprite layer disabled, so when you screenshot, you are actually grabbing multiple layers at a time. I think this is what Terra means.
« Last Edit: September 18, 2012, 11:14:13 pm by Troy Lundin »

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #11 on: September 19, 2012, 01:16:30 am »
With the screenshot method, you could just have the sprite layer disabled, so when you screenshot, you are actually grabbing multiple layers at a time.

Of course, grabbing multiple layers at a time is preferred when possible. However, in many games, most notably on the SNES, the background doesn't move at the same speed the foreground does (it's called a parallax effect). When this is the case, if you don't capture them separately, you'll end up with pretty bad cases of background misalignment. This is where you need to use layers.

I didn't recommend GIMP only for this reason, but this was the question Terra asked in this thread. (It was about transparency and layers.)

Now, if you wonder why I recommended GIMP to Terra, it was to help improve his efficiency as explained in this post in the Solstice (NES) thread.
« Last Edit: September 19, 2012, 01:19:56 am by GSA »

Offline Rekrul

  • Newbie
  • *
  • Posts: 6
Re: GIMP 2.8.2 - Basic questions
« Reply #12 on: September 19, 2012, 07:51:21 am »
I'm new here, and by no means a graphic expert, but I wanted to add my two cents to the discussion.

I was never an artist. I can't draw a realistic looking image to save my life. I'd say that any skills I have are more geared toward drafting and image manipulation than actually creating "art". I used to use Deluxe Paint on the Amiga to create diagrams, cassette inserts, code rings (the resolution wasn't high enough to create code wheels) for copy protected games, etc.

When I started using Windows, I tried using MS Paint and found it incredible frustrating. As a test, I took a simple cartoon image of an eagle in front of a flat US flag and tried to erase the eagle. It should have been a simple matter of copying parts of the flag and pasting over the eagle, but the clunky select, copy, paste, position, stamp process was a royal pain in the butt.

I tried an earlier version of Jasc Paint Shop Pro, but it also had a complex method for copying parts of the image. You can cut out a 'brush', but it only uses the shape to paint with. When I emailed the company, they described how to create an image tube, which takes about ten steps and doesn't let you see the copy before stamping it down, making it impossible to position correctly.

I've also tried GIMP, and I'm sure it's powerful, but it also seems clunky. For example, to copy part of an image, you have to use the selection tool (no arbitrary-polygon tool?), select Copy, switch to a painting tool, then select Select None from the menu to clear the current selection box, then select Paste, select the movement tool, position the box where you want, select Paste again, then move the selected image out of the way to see the modification to the image. Not to mention that after selecting Paste, I can't figure out how to make the floating copy go away. How do you take a large portion of the image and just draw with it? How do you select an irregular portion of the image without resorting to the freehand tool?

Why do so many programs over-complicate things?

All this is my long-winded way of saying I found a program that I think is much easier to use. It may not have all of the features of the fancier programs, but I find it quite intuitive to work with. It's called Ultimate Paint. It's the closest thing to Deluxe Paint that I've found.

Cutting out and using a brush is as simple as selecting the brush tool (or pressing "B"), and then selecting the region you want (there are seven different methods). As soon as you release the button, the selection is attached to the pointer (you can switch the handle to the center or four corners via the menus or by pressing "5" on the numeric keypad), then you can stamp down copies, paint, etc. There are separate options for cutting brushes and selecting regions to constrain operations. For all the tools, the left button draws, the right button erases to the current BG color.

On the downside, it lacks layers and the function to constrain mouse movement with the Shift key is seriously broken. It's available as both a free version and a paid version with a bunch of different image filters.

I'd be curious to hear what everyone here thinks of it.

Offline GSA

  • Newbie
  • *
  • Posts: 14
Re: GIMP 2.8.2 - Basic questions
« Reply #13 on: September 19, 2012, 07:56:40 pm »
When I started using Windows, I tried using MS Paint and found it incredible frustrating. As a test, I took a simple cartoon image of an eagle in front of a flat US flag and tried to erase the eagle. It should have been a simple matter of copying parts of the flag and pasting over the eagle, but the clunky select, copy, paste, position, stamp process was a royal pain in the butt.

That kind of job calls for the "Clone Tool". (Available in GIMP, Paint Shop Pro and Photoshop. Not available in MSPaint. Can't say for other software as I didn't try them.)

I've also tried GIMP, and I'm sure it's powerful, but it also seems clunky. For example, to copy part of an image, you have to use the selection tool (no arbitrary-polygon tool?), select Copy, switch to a painting tool, then select Select None from the menu to clear the current selection box, then select Paste, select the movement tool, position the box where you want, select Paste again, then move the selected image out of the way to see the modification to the image. Not to mention that after selecting Paste, I can't figure out how to make the floating copy go away. How do you take a large portion of the image and just draw with it? How do you select an irregular portion of the image without resorting to the freehand tool?

Why do so many programs over-complicate things?

Huh? ???

First, there is a polygon select tool in GIMP. It's the lasso. It works as freehand selection if you hold down your click, but if you do single clicks, it defines polygon vertices. Click on the starting point or double click to close the shape.

Secondly, I am dumbfounded by how circumvoluted your method of copying an image part is. Just select what you want. Hit Ctrl+C, Ctrl+V. Then "drag and drop" to move that piece around. Then click anywhere outside to anchor it. (No need to change tools; you can move an image part with any selection tool as the active tool.) Really, it couldn't be any simpler.

All this is my long-winded way of saying I found a program that I think is much easier to use. It may not have all of the features of the fancier programs, but I find it quite intuitive to work with. It's called Ultimate Paint. It's the closest thing to Deluxe Paint that I've found. Cutting out and using a brush is as simple as selecting the brush tool (or pressing "B"), and then selecting the region you want (there are seven different methods). As soon as you release the button, the selection is attached to the pointer (you can switch the handle to the center or four corners via the menus or by pressing "5" on the numeric keypad), then you can stamp down copies, paint, etc. There are separate options for cutting brushes and selecting regions to constrain operations. For all the tools, the left button draws, the right button erases to the current BG color. I'd be curious to hear what everyone here thinks of it.

I don't see in your description anything that Ultimate Paint would do more easily than GIMP. Therefore, I am not enticed to try Ultimate Paint. Sorry.

Feel free to ask more questions about GIMP; I'll do my best to answer them.

Offline Rekrul

  • Newbie
  • *
  • Posts: 6
Re: GIMP 2.8.2 - Basic questions
« Reply #14 on: September 19, 2012, 10:03:27 pm »
That kind of job calls for the "Clone Tool". (Available in GIMP, Paint Shop Pro and Photoshop. Not available in MSPaint. Can't say for other software as I didn't try them.)

I just tried GIMP's clone tool and unless I didn't know how to work it, it didn't seem at all suitable for the job of erasing a cartoon eagle from in front of a 3-color US flag image.

The GIMP documentation is vague on how to use it. It says you need to Control-Click the source image, but doesn't tell you how to change the selection from the thumbnail sized circle that it defaults to. Also when pasting copies of it, it blends the edges with the surrounding image. I guess that's how it's supposed to work, but it's more suited to working with imperfections in photos, rather than limited color images.

Huh? ???

First, there is a polygon select tool in GIMP. It's the lasso. It works as freehand selection if you hold down your click, but if you do single clicks, it defines polygon vertices. Click on the starting point or double click to close the shape.

Thank you, I didn't know that you could do that.

Secondly, I am dumbfounded by how circumvoluted your method of copying an image part is. Just select what you want. Hit Ctrl+C, Ctrl+V. Then "drag and drop" to move that piece around. Then click anywhere outside to anchor it. (No need to change tools; you can move an image part with any selection tool as the active tool.) Really, it couldn't be any simpler.

OK, I just tried it again, following your instructions.

I made a square selection, pressed CTRL-C, then CTRL-V. The pointer changed to an anchor, but nothing else happened. I clicked outside the selection and the box went away, but then I had to press CTRL-V again to make the copy appear. Moved it to where I wanted, clicked outside the box and it pasted it. If I wanted to paste additional copies, I had to press CTRL-V again for each one.

I don't see in your description anything that Ultimate Paint would do more easily than GIMP. Therefore, I am not enticed to try Ultimate Paint. Sorry.

You can more easily copy large pieces of the image and paste them elsewhere. Let's say that you want to erase some characters from a screenshot and for the sake of simplicity, let's assume that the background is a repeated pattern such that you can just seamlessly copy and paste over the characters. You would press "B" on the keyboard to activate the brush selection tool, and draw a box (or circle, freehand, etc) around the portion you want to copy. As soon as you release the button, the area you selected will be attached to your mouse. Position it where you want and left click to stamp it down. It remains attached until you make another brush or go back to one of the factory shapes. If there's part of the image you don't want copied, Press "G" for the color picker, right-click to select the background/transparent color and then this color will be omitted from the brush when you create it.

Or lets say that you have screenshots for a game saved as individual files. You create one large image to serve as the map, then open the first screenshot, which opens in a separate window. Press CTRL-A and the whole image becomes your brush. Close the screenshot window and left-click to paste it into your large map (using snap to grid if you want). Load the next screen shot, press CTRL-A, close the window and paste it into the map. Repeat.

Since the right mouse button erases with virtually every tool, it turns all the drawing tools into erasers without the need for a dedicated erase mode. Draw a filled box with the right mouse button and you erase a rectangle. Use a brush to erase freehand. Cut brush from the image, fill with the BG color, etc.

I'm not saying that Ultimate Paint is more powerful than GIMP. It's definitely more of a pixel-oriented program than an art program or an image manipulation program, but for simple image editing, it's fast and easy.

Feel free to ask more questions about GIMP; I'll do my best to answer them.

Can Gimp allow you to make multiple, unconnected selections at the same time?

I actually needed to do this for a project I did.

I wanted to make a scan of the copy protection codewheel for the C64 game Demon Stalkers, but I didn't want to rip my original codewheel apart to do it. So I drew two pencil lines on the back at the 12 & 9 O'clock positions and placed two pieces of tape on the edges of my scanner. I then aligned the wheel to the first selection and made a scan. Then I turned it to the next one and made another scan. I did this 24 times, which gave me scans of all the words on the back wheel, nine at a time, visible through the windows in the front wheel. I marked the exact center of each scan, then created a blank copy of the back wheel by erasing one of the scans and filling it with the same color. I then loaded each scan and used the multi-select option to outline each of the nine windows and the center mark simultaneously. Once copied, I could switch to my copy of the back wheel, line up the center mark and paste in all nine words at once, which would automatically be in the right positions. I repeated this 24 times and ended up with a filled in copy of the back wheel.

Also, is there any way to select part of an image, copy it and then just draw with it, at the original size? Using Paste requires you to position the frame and then click outside to make it permanent. Using the copy in the brush panel shrinks the size to a thumbnail, seems to rotate the brush as it moves and blends the edges.

Can I just copy, say a 100x100 area of the image and then draw with it, with no change to the size, no blending and no rotation? Basically I'm looking for something similar to copy & paste, but where the copy becomes your brush, follows the pointer around and you just use the left button to stamp it down, or hold the button and move the mouse to draw with it.

Oh, is there a way to copy part of the image and then use it as a stencil to erase parts of an image?

For example, I've made a bunch of tile sets for a small Windows game called Dragonboard, which is a Shanghai/Mahjong Solitaire game. I made two stencils, one for the tile faces and another for the tile edges. By copying either to a brush and then using the grid option, I can instantly erase all the faces while leaving the edges intact or erase the edges while leaving the faces intact. This comes in handy if I want to change the edges slightly, so that I don't accidentally leave any of the old ones while applying the new ones. Or if I want to re-use the edge graphics for a new tile set, I can just copy the faces stencil to a brush, use the grid and right-click to instantly erase all the tile faces leaving just the edges to work with.