aliens

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

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #15 on: December 30, 2017, 04:35:34 am »
I'm going to seek out other image editors.
Any luck so far? Care to compare notes about Linux editors?

Kolourpaint — Messes the palette beyond recognition. Replaces transparent background with non-transparent after undoing resizing of selection.

Krita — Can't work with 8-bit indexed colour.

Mtpaint — Refused to compile in 64-bit system (but I'll give a few more tries).

Pinta — Saves PNGs as truecolour. Palette saving "optimizes" palettes.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #17 on: December 30, 2017, 05:33:12 pm »
https://openxcom.org/forum/index.php/topic,2676.0.html
It lists mtPaint as "good", but it has troubles on new systems. Linux distributions are dropping it.

P.S. And HTTPS links to Evilpixie and GrafX2 don't work for me, only HTTP.
« Last Edit: December 30, 2017, 05:44:50 pm by tkzv »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Why is the background green?
« Reply #18 on: December 30, 2017, 05:58:40 pm »
It lists mtPaint as "good", but it has troubles on new systems. Linux distributions are dropping it.
But this do not change fact it "good" for editing palettes.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #19 on: December 30, 2017, 11:17:35 pm »
But this do not change fact it "good" for editing palettes.
No good for me, until it starts to work :(

EvilPixie needs a deprecated version of GIFlib. I'll see what I can do about that.

GraFX2 works. But it has a lot of quirks, most of which were common 20 years ago, but not now. It hangs with 100% processor load if it tries to display preview for GIMP XCF, and SIGTERM doesn't help, only SIGKILL. Some keyboard shortcuts conflict with xkb group toggle. It follows symlinks and saves changes to the original file, which was unexpected. File browser combines case-sensitive sorting with case-insensitive search, which ends up missing files that start with lowercase. Also the file browser treats Unicode as ISO-8859-1. Changes are only applied to the visible part of the image. Worst of all: it cannot fix palettes damaged by GIMP, or at least I didn't find the way.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Why is the background green?
« Reply #20 on: December 31, 2017, 01:07:14 am »
If you want fix only palette then falko tool could be useful: https://openxcom.org/forum/index.php/topic,2980.0.html

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #21 on: January 02, 2018, 03:27:13 am »
Falko's tool "fixes" the palette into a green alpha color.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Why is the background green?
« Reply #22 on: January 02, 2018, 11:51:32 pm »
In game? Remember color of first color index is irrelevant (in 99.9% cases) only its usage. If this green should be transparent and have index of 0 then it will be transparent in battlescape.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #23 on: January 03, 2018, 12:48:53 am »
No, in the editor. This is very difficult to work with. The green is very bright and I can't see what I'm doing without coloring the background black first. Then I have to remember to change it back to green/transparent.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Why is the background green?
« Reply #24 on: January 03, 2018, 01:06:21 am »
Do change pixels or palette? You probably need change palette color only. For battlescape code that blit units it will made no difference.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Why is the background green?
« Reply #25 on: January 03, 2018, 10:07:41 am »
There is no in-game issue Yankes... he just doesn't know how to change a non-transparent color into a transparent color in the PNG/GIF image (for the ease of editing).

The task is absolutely trivial (takes about 2 seconds), just let him figure it out on his own...

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Why is the background green?
« Reply #26 on: January 03, 2018, 03:16:48 pm »
There is no in-game issue Yankes... he just doesn't know how to change a non-transparent color into a transparent color in the PNG/GIF image (for the ease of editing).
I thought I was clear enough, but thanks for clearing that up.

The task is absolutely trivial (takes about 2 seconds), just let him figure it out on his own...
It's not that trivial, apparently. It should be trivial, but whoever designed most of these image editors doesn't seem to know what a palette is.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Why is the background green?
« Reply #27 on: January 03, 2018, 03:31:07 pm »
I was able to get it working in GIMP.  Opened up your bigobs_AlloyLaserTurret.png image in GIMP, changed image mode from indexed to RGB and back to indexed, selecting the proper colormap (otherwise GIMP removes color index 0, shifting all images down one color index), added alpha channel to the layer containing the image, then just selected the neon green background and deleted it.  If you already have the proper palette applied, just add alpha channel to the layer and delete the background color.

Edit: Another option for pixel editing tools is MCDEdit - IvanDogovich has a version that allows for working with 32x48 instead of 32x40 images, useful for bigobs and floorobs.  It's made with X-Com in mind, so the proper palettes are baked-in.
« Last Edit: January 03, 2018, 03:33:11 pm by ohartenstein23 »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Why is the background green?
« Reply #28 on: January 03, 2018, 04:58:20 pm »
I use GIMP to edit the image, then Grafx2 to apply the proper palette from an existing image. Works like a charm

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Why is the background green?
« Reply #29 on: January 05, 2018, 12:48:37 pm »
I use GIMP to edit the image, then Grafx2 to apply the proper palette from an existing image. Works like a charm
And how to do that if GIMP shifted the colours? Here's what I get: