Author Topic: [Solved] GIF Displaying differently in OXCE+ to OpenXcom?  (Read 4320 times)

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
[Solved] GIF Displaying differently in OXCE+ to OpenXcom?
« on: April 21, 2018, 08:24:33 am »
Hi all,

I've recently moved my modding over to OXCE+ and have encountered a weird issue where a BigObject image shows normally (i.e with appropriate transparency) in OpenXcom but the exact same file displays with a black box in OXCE+.

GIMP reports that the transparency is set up right to the best of my limited knowledge and it runs fine under OpenXcom soI am at a bit of a loss as to what to do.

Please find image attached for reference.
« Last Edit: February 11, 2023, 05:10:47 pm by Meridian »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #1 on: April 21, 2018, 08:44:28 am »
Meridian has an explanation of the issue here - the gist is that OXCE's scripts that can alter bigobs aren't as forgiving on GIF transparency as OXC. You shouldn't use GIF transparency on item or unit sprites, fill with color index 0 instead.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #2 on: April 21, 2018, 10:47:25 am »
Besides, .gif images don't work well on Macs (apparently these exist and people play games on them), so best solution is to just use .png instead.

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #3 on: April 21, 2018, 12:34:06 pm »
Converting to .png sounds like the easiest fix then, I'll give it a shot. Thanks!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #4 on: April 21, 2018, 01:21:05 pm »
Converting to PNG solves the Mac issue... it doesn't solve the transparency issue.

The only way to solve transparency issue is use color 0 as transparent. If you use other color, game will ignore it, regardless if it's gif or png.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #5 on: April 21, 2018, 01:46:27 pm »
Hmmm... Why would anyone use any other colour for transparency? O_o

That's the problem with all my advice, it always fails to predict weird choices from modders. :P

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #6 on: April 21, 2018, 04:54:21 pm »

Well, I converted to .png and it *did* solve the issue, so I don't know what to tell you there :P

Offline Keth01

  • Captain
  • ***
  • Posts: 50
    • View Profile
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #7 on: April 21, 2018, 05:00:56 pm »
Well, I converted to .png and it *did* solve the issue, so I don't know what to tell you there :P

--- posts merged. Yellow card :P ---

...actually, the conversion process probably re-indexed the transparent layer to something sensible, now that I consider it.
Anyhow, I've converted all 150+ images currently in the mod over to .png and have adopted it as the standard going forward, so no more issues there hopefully.
« Last Edit: April 21, 2018, 09:30:07 pm by Solarius Scorch »

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: GIF Displaying differently in OXCE+ to OpenXcom?
« Reply #8 on: April 21, 2018, 09:31:14 pm »
Yeah, that's what I did myself.
As an added bonus, I no longer have to worry about defining a wrong file type declaration in the ruleset. :P