32 bits per sample

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

32 bits per sample

yufengs

Hi all,

On Linux, I can hardly find a software that can open tiff file with 32 BitsPerSample, which is so frustrating.

Why libtiff does not support for tiff file with 32 bits per sample?

Regards,

Yufeng


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

rleigh
On 20/08/2016 04:15, [hidden email] wrote:
> On Linux, I can hardly find a software that can open tiff file with 32
> BitsPerSample, which is so frustrating.
>
> Why libtiff does not support for tiff file with 32 bits per sample?

It does certainly support it.  What is the problem you are seeing?


Regards,
Roger



_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

jcupitt
In reply to this post by yufengs
On 20 August 2016 at 05:15,  <[hidden email]> wrote:
> On Linux, I can hardly find a software that can open tiff file with 32
> BitsPerSample, which is so frustrating.

Some packages support most of the libtiff types. libvips, for example,
supports 32-bit tiff, including int, float and single-precision
complex. You can load, display, manipulate and save images in these
formats.

http://www.vips.ecs.soton.ac.uk

Have a look for "nip2" in your package manager.

> Why libtiff does not support for tiff file with 32 bits per sample?

It works well, it's just that support at the higher levels is a bit thin.

John
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

Bob Friesenhahn
In reply to this post by yufengs
On Sat, 20 Aug 2016, [hidden email] wrote:
>
> Hi all,
> On Linux, I can hardly find a software that can open tiff
> file with 32 BitsPerSample, which is so frustrating.
> Why libtiff
> does not support for tiff file with 32 bits per sample?

GraphicsMagick can read and write such files, although you would need
a special "Q32" build in order to preserve original integer values.

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

yufengs
In reply to this post by rleigh

Hi Roger,

I installed libtiff-tools version 4.0.6, and if I try something like:

tiff2pdf  name.tiff

it returns:

tiff2pdf: No support for name.tiff with 32 bits per sample

Regards,

Yufeng

> On 20/08/2016 04:15, [hidden email] wrote:

>> On Linux, I can hardly find a software that can open tiff file with 32
>> BitsPerSample, which is so frustrating.
>>
>> Why libtiff does not support for tiff file with 32 bits per sample?
>
> It does certainly support it. What is the problem you are seeing?
>
>
> Regards,
> Roger
>
>
>
> _______________________________________________
> Tiff mailing list: [hidden email]
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/
>

_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

yufengs
In reply to this post by yufengs

Hi,
Thank you all for your help, but nip2 and graphicsmagick do not work for my tiff file.

nip2 shows a whole black image, just like other image viewer (eog, gimp...) and gm says it doesn't support for my file format.

The only software I find can show my picture correctly is 'imview' (and 'irfan view' in windows also works fine)

Sorry but I am a total novice, I don't know where is the problem. May I upload my tiff file somewhere so that you guys can help me find out what's going on?

Thank you for your time!

Regards,

Yufeng


> On 20 August 2016 at 05:15, <[hidden email]> wrote:
>> On Linux, I can hardly find a software that can open tiff file with 32 BitsPerSample, which is so frustrating.
> Some packages support most of the libtiff types. libvips, for example, supports 32-bit tiff, including int, float and single-precision
> complex. You can load, display, manipulate and save images in these formats.
> http://www.vips.ecs.soton.ac.uk
> Have a look for "nip2" in your package manager.
>> Why libtiff does not support for tiff file with 32 bits per sample?
> It works well, it's just that support at the higher levels is a bit
thin.
> John




_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/

untitled-[2].html (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

Bob Friesenhahn
On Sat, 20 Aug 2016, [hidden email] wrote:

> Hi,
> Thank you all for your help, but nip2 and graphicsmagick do not
> work for my tiff file.
> nip2 shows a whole black image, just like
> other image viewer (eog, gimp...) and gm says it doesn't support for my
> file format.
> The only software I find can show my picture correctly
> is 'imview' (and 'irfan view' in windows also works fine)
> Sorry but
> I am a total novice, I don't know where is the problem. May I upload my
> tiff file somewhere so that you guys can help me find out what's going
> on?
> Thank you for your time!

What does 'tiffinfo' have to say about your file?

Perhaps it is something unusual like signed integer.

Feel free to upload your file via ftp to "ftp.graphicsmagick.org" in
the directory "incoming/graphicsmagick".

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

jcupitt
In reply to this post by yufengs
On 20 August 2016 at 19:20,  <[hidden email]> wrote:
> nip2 shows a whole black image, just like other image viewer (eog, gimp...)

You probably need to give it a hint on how to convert your image for display.

Double-click on the thumbnail in the main nip2 window to open an image
view, then select View / Display Control. Move the two sliders about
and you should be able to get something to appear.

Sure, upload a sample image somewhere, I'd be happy to have a look.

John
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

yufengs
In reply to this post by Bob Friesenhahn

Here is what tiffinfo says:

"""

TIFF Directory at offset 0x8 (8)

  Subfile Type: (0 = 0x0)

  Image Width: 2560 Image Length: 2560

  Bits/Sample: 32

  Sample Format: IEEE floating point

  Compression Scheme: None

  Photometric Interpretation: min-is-black

  Samples/Pixel: 1

  Rows/Strip: 2560

  Planar Configuration: single image plane

  ImageDescription: {"shape": [2560, 2560]}

  Software: tifffile.py

"""

And I also uploaded it (named 'Yufeng.tiff') to ftp.graphicsmagick.org/incoming/graphicsmagick

I'm sorry it's a little big, about 25MB.

Thank you!

Yufeng

> On Sat, 20 Aug 2016, [hidden email] wrote:


>
>> Hi,
>> Thank you all for your help, but nip2 and graphicsmagick do not
>> work for my tiff file.
>> nip2 shows a whole black image, just like
>> other image viewer (eog, gimp...) and gm says it doesn't support for my
>> file format.
>> The only software I find can show my picture correctly
>> is 'imview' (and 'irfan view' in windows also works fine)
>> Sorry but
>> I am a total novice, I don't know where is the problem. May I upload my
>> tiff file somewhere so that you guys can help me find out what's going
>> on?
>> Thank you for your time!
>
> What does 'tiffinfo' have to say about your file?
>
> Perhaps it is something unusual like signed integer.
>
> Feel free to upload your file via ftp to "ftp.graphicsmagick.org" in
> the directory "incoming/graphicsmagick".
>
> Bob
> --
> Bob Friesenhahn
> [hidden email], http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
>


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

yufengs
In reply to this post by jcupitt

This is the download link from google drive:

https://drive.google.com/file/d/0Bxt4LgeSWnnrU2RFbDZfTHl0R2c/view?usp=drive_web

Thank you in advance!

Yufeng

> On 20 August 2016 at 19:20, <[hidden email]> wrote:


>> nip2 shows a whole black image, just like other image viewer (eog,
>> gimp...)
>
> You probably need to give it a hint on how to convert your image for
> display.
>
> Double-click on the thumbnail in the main nip2 window to open an image
> view, then select View / Display Control. Move the two sliders about
> and you should be able to get something to appear.
>
> Sure, upload a sample image somewhere, I'd be happy to have a look.
>
> John
>


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

jcupitt
Your image has a tiny numeric range, it varies between -0.0013 and
+0.0083. The sliders in nip2 will scale an image by up to 256, but
that's not enough to make anything visible.

If you click on the cogs to the left of the display control bar,
there's an extra menu. Select "scale" and it'll search the part of the
image that's visible and pick a scale and offset to make that area 0 -
255. If I do that I can see a rather nice image of a ball of cells, or
something like that. Pretty!

Is the numeric value significant? If not, I'd just scale it up a bit.
If you have your image loaded as A1, type A1 * 20000 in the text box
to make something that's a bit easier to see.

John


On 21 August 2016 at 00:28,  <[hidden email]> wrote:

> This is the download link from google drive:
>
> https://drive.google.com/file/d/0Bxt4LgeSWnnrU2RFbDZfTHl0R2c/view?usp=drive_web
>
> Thank you in advance!
>
> Yufeng
>
>> On 20 August 2016 at 19:20, <[hidden email]> wrote:
>>> nip2 shows a whole black image, just like other image viewer (eog,
>>> gimp...)
>>
>> You probably need to give it a hint on how to convert your image for
>> display.
>>
>> Double-click on the thumbnail in the main nip2 window to open an image
>> view, then select View / Display Control. Move the two sliders about
>> and you should be able to get something to appear.
>>
>> Sure, upload a sample image somewhere, I'd be happy to have a look.
>>
>> John
>>
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|

Re: 32 bits per sample

Bob Friesenhahn
In reply to this post by yufengs
On Sat, 20 Aug 2016, [hidden email] wrote:
>
> And I also uploaded it (named
> 'Yufeng.tiff') to ftp.graphicsmagick.org/incoming/graphicsmagick
> I'm
> sorry it's a little big, about 25MB.

Your floating point TIFF uses an unusual range.  Unfortunately, it is
usually necessary to read the TIFF data twice in order to know how to
properly scale the data for viewing.

Through a bit of trial and error I found that the data
ranges from 0.0 to 0.01.  GraphicsMagick defaults to 0.0 to 1.0.

I am able to make sense of your data like

   gm convert -define tiff:min-sample-value=0.0 \
     -define tiff:max-sample-value=0.01 Yufeng.tiff Yufeng.jpg

Using

   gm convert -define tiff:min-sample-value=0.0 \
     -define tiff:max-sample-value=0.01 Yufeng.tiff \
     -gamma 2.2 Yufeng.jpg

helps when displaying the image on a computer.

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/