Page 1 of 2
How to convert 16 bit PNG to 16 bit TIF?
Posted: Fri Nov 29, 2019 10:08 am
by Micha
Hi,
if I convert a 16 bit PNG to a TIFF than the 16 bit color depth is lost. Is it a bug or do I need to set the right parameter only?
-Micha
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Fri Nov 29, 2019 10:56 am
by xnview
Image data is 8bits per component internally, only NConvert can convert 16bits to 16bits
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Fri Nov 29, 2019 12:01 pm
by Micha
Sounds good. I tried it but ... "WARNING: the picture will be converted to RGB with 8bits per component". Did I have overseen an option?
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Fri Nov 29, 2019 2:01 pm
by cday
Micha wrote: Fri Nov 29, 2019 12:01 pm
Sounds good. I tried it but ... "WARNING: the picture will be converted to RGB with 8bits per component". Did I have overseen an option?
Pierre is referring to NConvert the command line utility, if that could be a source of confusion?
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Fri Nov 29, 2019 2:04 pm
by Micha
Thank you for the hint. I tested it at NConvert with UI. So, I will look for how to use the command line tool.
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Tue Jan 26, 2021 1:14 pm
by marsie321
I have the same problem, I really like XnView MP but my sensor-data (infrared) is 16bit. I need to extract the pages and save as 16bit tiff.
Do you have plans to integrated saving as 16bit in XnView MP?
And how do I tell nconvert that it should save as 16Bit gray tiff - here is what I have done so far:
nconvert -out tiff -xall -keepfiledate -keepcspace ./DJI_0018.TIFF
Thank you.
Martin
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Tue Jan 26, 2021 1:52 pm
by marsie321
Maybe the problem is that the file is not recognized correctly. It is a multi-page 16-bit grey tiff.
identify ./DJI_0018.TIFF
./DJI_0018.TIFF[0] TIFF 640x512 640x512+0+0 16-bit Grayscale Gray 2.16959GiB 2.830u 0:10.921
./DJI_0018.TIFF[1] TIFF 640x512 640x512+0+0 16-bit Grayscale Gray 2.850u 0:10.928
nconvert -v -i -ctype grey -in tiff ./DJI_0018.TIFF
** NCONVERT v7.39 (c) 1991-2019 Pierre-E Gougelet (Feb 25 2020/13:19:45) **
Version for Linux x86 (X11) (All rights reserved)
A TIFF (RGB) was recognized : ./DJI_0018.TIFF
Width:640 Height:512 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 640
xdpi : 0 ydpi : 0
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Tue Jan 26, 2021 2:06 pm
by xnview
you need to use -org_depth
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Tue Jan 26, 2021 2:26 pm
by marsie321
Hi Pierre,
also with -org_depth it does not work, can I force or overwrite the channels depth to set gray-16Bit for tiff?
nconvert -v -i -ctype grey -org_depth -in tiff ./DJI_0018.TIFF
** NCONVERT v7.39 (c) 1991-2019 Pierre-E Gougelet (Feb 25 2020/13:19:45) **
Version for Linux x86 (X11) (All rights reserved)
** This is freeware software (for non-commercial use)
A TIFF (RGB) was recognized : ./DJI_0018.TIFF
Width:640 Height:512 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 640
xdpi : 0 ydpi : 0
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Wed Jan 27, 2021 10:13 am
by xnview
the original depth is 8bits?
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Wed Jan 27, 2021 10:42 am
by marsie321
Hi Pierre,
the original data is 16 bit, but NCovert is recognizing it as 8 bit. Otherwise nconvert is doing everything great, splitting the multi-page tiff and rewrite the exif/meta.
magick identify ./DJI_0018.TIFF
./DJI_0018.TIFF[0] TIFF 640x512 640x512+0+0 16-bit Grayscale Gray 2.16959GiB 2.830u 0:10.921
./DJI_0018.TIFF[1] TIFF 640x512 640x512+0+0 16-bit Grayscale Gray 2.850u 0:10.928
mediainfo ./DJI_0018.TIFF
General
Complete name : ./DJI_0018.TIFF
Format : TIFF
File size : 2.17 GiB
Writing application : DJI V06.02.20
Writing library : XT2
Image
Format : Raw
Format settings : Little
Width : 640 pixels
Height : 512 pixels
Color space : Y
Bit depth : 16 bits
Compression mode : Lossless
Density : 1 dpcm
nconvert -i -v -org_depth ./DJI_0018.TIFF
** NCONVERT v7.39 (c) 1991-2019 Pierre-E Gougelet (Feb 25 2020/13:19:45) **
Version for Linux x86 (X11) (All rights reserved)
** This is freeware software (for non-commercial use)
A TIFF (RGB) was recognized : ./DJI_0018.TIFF
Width:640 Height:512 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 640
xdpi : 0 ydpi : 0
nconvert -i -v ./DJI_0018.TIFF
** NCONVERT v7.39 (c) 1991-2019 Pierre-E Gougelet (Feb 25 2020/13:19:45) **
Version for Linux x86 (X11) (All rights reserved)
** This is freeware software (for non-commercial use)
A TIFF (RGB) was recognized : ./DJI_0018.TIFF
Width:640 Height:512 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 640
xdpi : 0 ydpi : 0
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Wed Jan 27, 2021 11:17 am
by marsie321
Hi Pierre,
I uploaded a single page (DJI_0018_55.tif).
mediainfo DJI_0018_55.tif
General
Complete name : DJI_0018_55.tif
Format : TIFF
File size : 642 KiB
Image
Format : Raw
Format settings : Little
Width : 640 pixels
Height : 512 pixels
Color space : Y
Bit depth : 16 bits
Compression mode : Lossless
Density : 1 dpcm
nconvert -v -i DJI_0018_55.tif
** NCONVERT v7.39 (c) 1991-2019 Pierre-E Gougelet (Feb 25 2020/13:19:45) **
Version for Linux x86 (X11) (All rights reserved)
** This is freeware software (for non-commercial use)
A TIFF (RGB) was recognized : DJI_0018_55.tif
Width:640 Height:512 with 256 colors
Nplanes : 1 Bitscount : 8
Bytes Per Plane : 640
xdpi : 0 ydpi : 0
Conversion of DJI_0018_55.tif into DJI_0018_55_1.tif OK
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Thu Jan 28, 2021 12:15 pm
by xnview
ok, i don't know why and when, but the 16bits support has disappear from NConvert, i'll fix it
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Thu Jan 28, 2021 10:00 pm
by marsie321
Thank you,
If you like I could to test the 16bit support even in beta-version, and give you feedback. I also have some ppm in 16bit, that I can test.
Re: How to convert 16 bit PNG to 16 bit TIF?
Posted: Mon Feb 08, 2021 8:31 pm
by marsie321
Hi Pierre,
do you have any roadmap in mind regarding the fix of the 16bit.
Thank you,