Author Topic: alpha channel on greyscale tiff crashes TG  (Read 3834 times)

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
alpha channel on greyscale tiff crashes TG
« on: April 07, 2007, 04:41:35 PM »
I've been creating some image masks from World Machine, and changed things a bit by saving TGA files from WM rather than BMP, and then converting these to TIFF (RGB converted to greyscale) via Photoshop.

The first image i created was a replacement for an image already linked in a TGD. When I opened the file TG crashes while attempting to render the preview image. The image appears to load without error. I tried earlier TGDs with the same result, and then started from scratch again, with TG crashing just after adding the image map. The only other thing in the TGD with the last test was a TER terrain.

I went back to Photoshop and noticed that the images had an alpha channel. Removing the alpha channel fixed the problem. Each time I forgot to remove the alpha channel TG crashed so it's quite repeatable.

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13187
  • Holy snagging ducks!
Re: alpha channel on greyscale tiff crashes TG
« Reply #1 on: April 09, 2007, 08:19:50 PM »
Are the TIFF's *literally* greyscale, or is it a 24bit (plus alpha) image just holding grey values? Is it 8 bit or 16 bit greyscale?

- Oshyan

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: alpha channel on greyscale tiff crashes TG
« Reply #2 on: April 10, 2007, 01:51:41 PM »
Definitely 8bit greyscale (minimising RAM usage as much as possible)... LZW compressed Back at work tomorrow so I'll try it there as well.
« Last Edit: April 10, 2007, 01:55:27 PM by bigben »

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13187
  • Holy snagging ducks!
Re: alpha channel on greyscale tiff crashes TG
« Reply #3 on: April 10, 2007, 09:14:22 PM »
Ah, try without compression. I believe we're using an external library for the TIFF support and it may not fully support compression. I know TIFF is one of those formats that *can* have compatibility issues between various implementations because it's not entirely standardized.

- Oshyan

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: alpha channel on greyscale tiff crashes TG
« Reply #4 on: April 10, 2007, 11:57:38 PM »
No it's definitely the alpha channel. I tried compressed and uncompressed on my PC at work with the same result.  All of my greyscale masks are LZW compressed and I haven't had any problems at all with images up to 11,000x11,000 (although my normal maximum is 8,000 x 8,000).

For the repeat test I just created a new document in Photoshop to make sure it wasn't something from WM. They will work OK if you either remove the alpha channel *or* convert them to RGB, so it's something specific to the combination of greyscale with alpha channel.
« Last Edit: April 12, 2007, 01:17:30 AM by bigben »

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13187
  • Holy snagging ducks!
Re: alpha channel on greyscale tiff crashes TG
« Reply #5 on: April 11, 2007, 12:27:12 AM »
Interesting. Thanks for the detailed report and investigation. Hopefully most of the image handling issues can be resolved soon.

- Oshyan