GIMP, transparency and PowerPoint

This is just something I worked out how to do recently. It’s simple and I think looks quite good.

Let’s say I’m putting together a PowerPoint presentation because I have to. I want to show an example of a document I have put together, a sort of sheaf of pages or screens.

I open GIMP and create a new image that is big enough in pixels to contain everything I want.

File → New

Then I open the images I want to combine into the one image. I’m going to use this and this, or something very similar.

I open them in GIMP as layers into my empty image.

Open → Open as Layers

Then in the new now-not-blank image, Layer → Scale Layer and enter the desired height.

Repeat with the second image, using the same height (in this case).

Position as desired.

(Now, this helps:

Edit → Preferences → Tool Options → Set Layer or Path as active (https://ubuntuforums.org/showthread.php?t=1656588))

Could rotate etc, but not for now.

Layer  Transparency → Add Alpha Channel

Now, there are a few ways to make the background transparent. In this case, I can just go:

Layer  Transparency → Color to Alpha

And I get a screen like this:

Screenshot

The Color to Alpha dialogue

If I click on the eyedropper beside the ‘Color’ box (the one currently showing a white rectangle) I can then click on the black of the background to get this:

Screenshot

Showing the transparent regions as chequerboard patterns.

Note the colour rectangle has turned black and the black background is now denoted as transparent/Alpha by the pattern.

I can then export to png, say, to get a graphic with transparency. But, the Color to Alpha option has a problem. In this case, I have other layers in front of the background. But let’s imagine you had a single layer and wanted to make a red border transparent. If you make all the red transparent, that will include the red component of compound colours, like orange. So any colour that has a red component will be changed. I can illustrate this by flattening this image, so it is a single layer, then repeating the process.

Image  Flatten Image

Then do the same as above — add an Alpha channel and then make black into Alpha. My screenshot now looks like this:

Screenshot, showing that making black transparent has removed blacks from the images and changed their colours.

When I flatten first.

The blacks have been made transparent everywhere, so the darknesses of all the tones have changed — not what I wanted. Instead, I need to use the fuzzy select tool. After adding the Alpha channel, I can do this:

Tools → Selection Tools → Fuzzy Select

Then I click on a visible bit of the background. Then hit Delete. That should select the background and then delete it, leaving only the transparent Alpha channel. Here’s the screenshot — looks OK.

Screenshot -- looks good.

The image after using the Fuzzy Select tool.

And now I have what I want. In this case, I may as well keep the image with the layers, since that allows more flexible editing at a later date, but this Fuzzy Select business is useful if the image is a single layer, say a bitmap that cannot easily be separated into layers. The fuzzy select is clever, but may not always highlight exactly what is wanted, especially if colours blend into each other. YMMV.

Anyway, once the transparency is as desired, I can Export as a png. I just use the defaults. Now, Here is the resulting png on a very simple page in PowerPoint. I have used PPT options to add shadows to bottom and right; note that PPT is clever enough to only shadow the non-transparent bits of the image. Maybe you take that for granted. I, in my ignorance, was quite pleased.

Screenshot.

PPT only puts shadows behind non-transparent pixels.

Transparency lets images overlap more naturally, lets your slide background and theme show through more regularly, and generally gives a more professional appearance since you can get away from that look of simply having a bunch of rectangles.

 

FWIW

Tags: , , , , , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: