Author Topic: PI 01.05.09.0553 32-bit osx tiff save bug?  (Read 4024 times)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
PI 01.05.09.0553 32-bit osx tiff save bug?
« on: 2009 December 28 00:20:24 »
hola,

when i save a 16-bit TIFF file using PI 01.05.09.0553 on macos 10.5.7, if i use ZIP compression, Preview.app (and any application that depends on apple's libraries to open TIFF files) fails to open the file. Photoshop CS and Lightroom 2.4 can open these tiff files. uncompressed 16-bit tiffs will open fine under preview.app.

maybe this is a byte-endianness problem?

thanks,

rob

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PI 01.05.09.0553 32-bit osx tiff save bug?
« Reply #1 on: 2010 January 03 10:02:58 »
Hi Rob,

No, this isn't an endianness issue as you're running PixInsight on an Intel x86 based Macintosh platform, which is little-endian just as a non-Apple Linux or Windows PC.

This means that Preview.app doesn't implement ZIP compression for TIFF files. There's no bug here, just a lack of functionality --in Preview.app, not in PI :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PI 01.05.09.0553 32-bit osx tiff save bug?
« Reply #2 on: 2010 January 03 21:50:03 »
well by endianness i did not really mean the cpu's native endianness. i meant that apparently the tiff byte ordering can be forced as little-endian or big-endian, at least when you save a tiff in photoshop.  i thought maybe PI was writing tiffs out in an order that preview.app can not understand.

however, i just saved both 16 and 8-bit tiffs, as both mac and pc byte ordering, all with ZIP compression from photoshop CS. preview.app can open all 4 of these files. so i don't think it's the case that preview.app does not implement zip compression. or photoshop is lying to me.

are you guys using libtiff to generate tiffs or did you roll your own? if you are using libtiff, maybe there are some flags that can be passed to the tiff creation functions that would increase the compatibility of the files.



Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PI 01.05.09.0553 32-bit osx tiff save bug?
« Reply #3 on: 2010 January 04 04:20:12 »
Hi Rob,

I've just made some tests on Mac OS X 10.6.2 (Snow Leopard up-to-date). Preview.app can open without problems 8-bit and 16-bit ZIP-compressed TIFF files generated with PixInsight 1.5.9.561. So perhaps this is a problem only with OS X 10.5 (Leopard)?

We indeed use LIBTIFF to implement all TIFF format support in PixInsight. Our use of ZIP compression (deflate algorithm) is also standard (or PS would crash upon trying to open one of our TIFF files --sorry, I couldn't resist!  ;D >:D ).

Regarding endianness, LIBTIFF manages it transparently. Applications that use LIBTIFF see TIFF images in the native host machine endian order, irrespective of the actual order used to write the files.

I don't want to say we're doing things better than Apple by no means, but I think we are doing them at least reasonably well, and following the standards in use. The fact that Snow Leopard can open our TIFF files confirms that IMO.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: PI 01.05.09.0553 32-bit osx tiff save bug?
« Reply #4 on: 2010 January 04 13:26:26 »
that's fine. sounds like a leopard bug then. i havent upgraded to snow leopard yet but its good to know that it will fix the problem.

thanks for checking it out.

rob