aliens

Author Topic: [SOLUTIONS IN THREAD] Why is the background green?  (Read 14188 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[SOLUTIONS IN THREAD] Why is the background green?
« on: December 12, 2017, 07:47:23 am »
Sometimes I get a green background on images and sometimes it looks like a grey checkerboard pattern. Why is it different in different images with the same palette, and how do I change it from one to the other?

I've attached example images.
« Last Edit: January 05, 2018, 01:52:37 pm by The Reaver of Darkness »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Why is the background green?
« Reply #1 on: December 12, 2017, 07:59:22 am »
proper transparency support.
use .PNG and don't worry about it - it'll show up correctly in-game, colour 0 is treated as transparent no matter what actual colour it is.
.GIF has compatibility issues with mac.
« Last Edit: December 12, 2017, 08:01:58 am by Warboy1982 »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #2 on: December 12, 2017, 09:01:43 am »
But I have .pngs that don't have a green background. How do I make them all like that?

I realize they show up properly in-game, but that's not good enough. I need them to show up properly in my image editor so I can see what I'm doing, and I need them to show up properly on the forum so that people can see what I made.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Why is the background green?
« Reply #3 on: December 12, 2017, 09:27:33 am »
Just change the color no. 0 to whatever you like. (You can do that, for example with Gimp.) If you prefer green to be this color, that's OK. Just make sure, not to pick any color already used somewhere else as this might get confusing again. =)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #4 on: December 12, 2017, 05:12:12 pm »
But how do I make color 0 transparent?

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: Why is the background green?
« Reply #5 on: December 12, 2017, 05:15:47 pm »
IIRC, that's an option you can set during export with Gimp.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Why is the background green?
« Reply #6 on: December 21, 2017, 12:42:04 pm »
But how do I make color 0 transparent?

Using your favourite image editor?
Basically anything except MS Paint should work... I used IrfanView and attached example.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #7 on: December 21, 2017, 10:56:14 pm »
mtPaint also doesn't work. Gimp doesn't work. I can't afford Aseprite. I can't afford Photoshop. I had never heard of IrfanView before you mentioned it here. I guess I need to get a better image editor.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Why is the background green?
« Reply #8 on: December 21, 2017, 11:11:15 pm »
i'm pretty sure you can get older versions of photoshop free from adobe

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #9 on: December 22, 2017, 03:19:14 am »
Gimp doesn't work.

Here's what is broken in GIMP: https://bugzilla.gnome.org/show_bug.cgi?id=791531#c3 The bug was first reported in 2010.

If you can find a program that would change a palette (colour map) in saved PNG and if you don't use colour 1 (seen as 0 in GIMP), GIMP would be usable. (Photoshop can do it, but I see it's not an option.) If you can program, you can write a converter using something like libpng.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #10 on: December 22, 2017, 07:05:36 am »
It's doing more than that. When I load a paletted image, it doesn't show the palette. But even if I do nothing that would upset that palette, once I save the file and load it in mtPaint where I can see the palette, it will have been rearranged into the default 256-color palette. That's the same thing MS Paint does.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #11 on: December 22, 2017, 08:11:11 pm »
It's doing more than that. When I load a paletted image, it doesn't show the palette. But even if I do nothing that would upset that palette, once I save the file and load it in mtPaint where I can see the palette, it will have been rearranged into the default 256-color palette. That's the same thing MS Paint does.
GIMP? I've never encountered such problem. There may be some default import setting, which causes it. Does the import dialog appear when you open an indexed PNG?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #12 on: December 22, 2017, 10:08:19 pm »
No. No dialogue appears when I load an image. A dialogue appears when I try to export one, but it offers only options unrelated to what I need.

I tried loading and exporting a .gif and a .png, and I got different results. The .png had its palette intact, while the .gif had all colors past the last used color turned white.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #13 on: December 23, 2017, 12:55:58 am »
Ah, I was speaking of PNG.

The import settings will appear if Edit -> Preferences -> Image Import -> "Color profile policy" is set to "Ask what to do". And if the PNG has colour profile.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #14 on: December 23, 2017, 05:49:00 am »
On mine it is set to "Ask what to do" but it doesn't ask. In any case, it looks like it can work if I stick to .pngs but I don't like it. I don't trust it to always work, and I don't really like Gimp's tools for pixel work anyway. I'm going to seek out other image editors.