Chex Quest Fan Forums

General => Tech Support => Topic started by: Awesomedude249 on April 13, 2015, 12:22:56 PM

Title: Question about GIMP
Post by: Awesomedude249 on April 13, 2015, 12:22:56 PM
I wondered, since this is the tech support section, something that's an issue with using GIMP on a PC.

I have two computers that run GIMP, my CrunchBang Linux netbook, and a Windows 7 Emachines PC.

I use GIMP very frequently on the PC and netbook, but on the PC, if I find an image that has a transparent background (AKA alpha channel) then use Copy Image and paste it into GIMP, it does not show up transparent, it shows up with a black background. And the image looks really crappy when I use fuzzy select to select the black and delete it. Anyway, sorry for the long explanation, but I hope someone can solve this problem.

(Oh, and BTW, when I do this procedure on my netbook, it shows up transparent, but it doesn't work on PC.)
Title: Re: Question about GIMP
Post by: MajorSlime on April 13, 2015, 12:59:41 PM
I'd say, either update GIMP, or there's a setting somewhere you need to change. I don't know much about it, so I can't help more than that.

Title: Re: Question about GIMP
Post by: 75 on April 13, 2015, 04:07:38 PM
Couple things to try:

1. If you're pasting this image with an alpha channel into a new image, you have to make sure you select "Transparency" as the background, otherwise it will helpfully fill your alpha channel with a background color when you paste it in.

(http://i.imgur.com/PgvSqBq.png)

It always defaults to "background color" I forget to do this sometimes (I almost never want a background color).

It's likely you've got a slightly newer or older version on your other computers, they change stuff in the UI pretty frequently (e.g., the Save As / Export nonsense feature got introduced recently) and maybe the defaults changed.

2. if this ISN'T a new image, verify that the image you're editing is RGB, NOT Indexed color

(http://i.imgur.com/LpGqEc3.png)

If it's indexed color weird stuff will happen, I've never heard of an indexed color palette with an alpha channel.

Note that when you export pngs from Doom/Chex/etc it will export them as Indexed Color, you have to convert it to RGB before you copy/paste stuff in.
Title: Re: Question about GIMP
Post by: MajorSlime on April 13, 2015, 04:40:18 PM
If it's indexed color weird stuff will happen, I've never heard of an indexed color palette with an alpha channel.

That's because last time I checked they don't exist, due to the way indexed color palette files are stored. The format specification just doesn't support alpha.
Title: Re: Question about GIMP
Post by: Drwalrustein on April 13, 2015, 05:14:14 PM
I really don't use that much but only for thumbnails for my videos on youtube. My channel: https://www.youtube.com/channel/UCgRkEJWVbcGhhOCLwOr8FVg
Title: Re: Question about GIMP
Post by: 75 on April 13, 2015, 06:27:03 PM
If it's indexed color weird stuff will happen, I've never heard of an indexed color palette with an alpha channel.

That's because last time I checked they don't exist, due to the way indexed color palette files are stored. The format specification just doesn't support alpha.

Well... not to confuse you guys but technically indexed color just means "replace a color of a given index with a color defined in the palette". Some palettes have an alpha component (e.g., I think paletted pngs use RGBa), if in theory there was an image format that used indexed color and provided a palette that had an alpha component, I don't see any reason why an indexed color image couldn't have transparency.

http://en.wikipedia.org/wiki/Indexed_color

With that said I don't know of any image format that does that, so always use RGB mode for images with fully transparent pixels, semi-transparent pixels, or even when you want to add a layer / copy/paste an image that has any kind of transparency.
Title: Re: Question about GIMP
Post by: MajorSlime on April 14, 2015, 03:12:21 AM

http://www.libpng.org/pub/png/book/chapter08.html

Quote
The PNG spec forbids the use of a full alpha channel with palette-based images, but it does allow ``cheap alpha'' via the transparency chunk,


So, it exists, but its kind of a cheap hack. AFAIK, the paletted image format scheme came from before a time where transparency was common, so although it might be possible, I doubt any image format actually implements it 'officially'.
Title: Re: Question about GIMP
Post by: Awesomedude249 on April 14, 2015, 03:13:02 PM
That's weird, cause when I made DooM sprites with indexed color, they could be transparent.
Title: Re: Question about GIMP
Post by: MajorSlime on April 14, 2015, 06:39:06 PM
Doom uses a color 'key', usually the cyan color, to create transparency when they are used in the game. So the 'transparent' color is actually cyan.
Title: Re: Question about GIMP
Post by: 75 on April 14, 2015, 08:00:16 PM
That's weird, cause when I made DooM sprites with indexed color, they could be transparent.

Be careful not to mix up translucent pixels and transparent pixels, they are two very different things. Apple juice is translucent, air is transparent.

Doom format images and indexed color will not have translucent pixels, but Doom has transparent pixels

The benefit of transparent pixels is that your sprites don't have to be box shaped

Here's an image that has transparent pixels, if we didn't have transparent pixels we'd have to put a white box behind the flemoid and it would look really silly (unless you want to play cardboard cutout Chex)

note no part of this sprite is "translucent", you can't see through the flemoid's body.


(http://i.imgur.com/RmAixWy.png)


"transparent" pixels have a separate alpha channel, this isn't supported in Doom format images or any indexed color image I know of

Here's an image with translucent pixels -- note how the yellow gradient fades out steadily to a transparent background -- this is what you can't do with Doom format images / indexed color! (open it up in GIMP to see what I mean)

(http://i.imgur.com/GmoR65Y.png)

The benefit of transplucent pixels is that they appear to steadily fade away to whatever is behind them

Doom uses a color 'key', usually the cyan color, to create transparency when they are used in the game. So the 'transparent' color is actually cyan.

Not quite, IIRC cyan happened to be the color XWE used, cyan has no meaning at all to Doom. It's a convenient color for sure, but they could have really picked any color.

XWE just converted cyan to whatever index was "fully transparent" (I think 255).

Also, nitpicking, the transparency index doesn't have a color, it's not rendered.
Title: Re: Question about GIMP
Post by: Awesomedude249 on April 15, 2015, 10:57:33 AM
Thanks for all the help guys, but none of this has helped. What's wrong?
Title: Re: Question about GIMP
Post by: 75 on April 15, 2015, 08:01:29 PM
Thanks for all the help guys, but none of this has helped. What's wrong?

You're going to have to upload the image you're trying to copy in, as well as the image you want to put it on
Title: Re: Question about GIMP
Post by: Awesomedude249 on April 16, 2015, 01:03:33 PM
Well, no specified image, just a few images I have found that haven't been working. I may try just downloading the image as a PNG, and opening it into gimp with the Open As Layers function. Hold on, I'll try it...

EDIT: OK guys, my solution worked. Yay! But when I do animation with multiple transparent images, boy oh boy is this gonna be hard...