Problem converting, compressed png -> uncompressed tiff

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

Post Reply
Andys
Posts: 13
Joined: Wed Jun 04, 2008 7:14 am

Problem converting, compressed png -> uncompressed tiff

Post by Andys »

I use NConvert 4.95, WinXP (which is named 4.92 in downloads).
While converting png to tiff (-out tiff -D *.*) I always get a compressed tiff file. Compression is lossless (not jpeg).
I tried using option "-c 1", it doesn't work. Tiff file size is the same. Other compression options (-c 1, -c 2 etc) are also ignored - file size is the same as before.
I want to get an uncompressed tiff on first try without converting twice through bmp.
Help me please.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Problem converting, compressed png -> uncompressed ti

Post by xnview »

try -c 8
Pierre.
Andys
Posts: 13
Joined: Wed Jun 04, 2008 7:14 am

Post by Andys »

The same. Compression option is simply ignored. I compared it in hex mode - tiff files are the same for different compressions.
Tried 24/32 bit files, and from jpeg files.
While experimenting I noticed that when I convert a bmp to tiff it also ignores compression option. An uncompressed tiff is created from any "-c" values.
Maybe it's my system's fault?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Could you send me your original picture?
Pierre.
Andys
Posts: 13
Joined: Wed Jun 04, 2008 7:14 am

Post by Andys »

I ran a test with old version (from old xnview release stored on my pc)
Both were run with only '-out tiff' option. Input file is jpg.
Nconvert -info on resulting tiff:
nconvert 4.57

Code: Select all

034.tif : Success
    Format          : TIFF
    Name            : tiff
    Compression     : Uncompressed
    Width           : 800
    Height          : 600
    Nplanes         : 1
    Bitscount       : 24
    Depth           : 24
    # colors        : 16777216
    Bytes Per Plane : 2400
    Orientation     : Top Left
    Xdpi            : 72
    Ydpi            : 72
    Page(s)         : 1
nconvert 4.95

Code: Select all

034.tif : Success
    Format               : TIFF
    Name                 : tiff
    Compression          : JPEG
    Width                : 800
    Height               : 600
    Components per pixel : 3
    Bits per component   : 8
    Depth                : 24
    # colors             : 16777216
    Color model          : RGB
    Bytes Per Plane      : 2400
    Orientation          : Top Left
    Xdpi                 : 72
    Ydpi                 : 72
    Page(s)              : 1
4.95 - As before, -c ? option doesn't change anything. Compression in always JPEG (= compression of input file)
4.57 - '-c' works - it correctly creates JPEG-compressed tiff with '-c 8' added and uncompressed file by default.

p.s. I sent the png by email, probably won't be much help.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Ok, right i've reproduced the problem!!
Pierre.
Markus_S
Posts: 4
Joined: Wed Jul 23, 2008 7:53 am

Post by Markus_S »

Hi Pierre,

any news about this topic? I also have this "problem" to use "-c 8" option without getting any compression. Thanks anyway.

Markus
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Markus_S wrote:any news about this topic? I also have this "problem" to use "-c 8" option without getting any compression. Thanks anyway.
It's fixed in last release
Pierre.
Markus_S
Posts: 4
Joined: Wed Jul 23, 2008 7:53 am

Post by Markus_S »

Hi,

thanks for your quick reply. I downloaded latest release but problem exists on. Maybe I´m having an error in my command line or the source file does not support the compression? I have a GIF and need to turn it into G4 tif. so command looks like "-out tiff -c 7 -o DATADIR1\#.tif DATDIR2\*.gif" right? But nconvert -info shows Compression: uncompressed. Only -c 8 has any effects -> Compression CCIT G3.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Markus_S wrote:Hi,

thanks for your quick reply. I downloaded latest release but problem exists on. Maybe I´m having an error in my command line or the source file does not support the compression? I have a GIF and need to turn it into G4 tif. so command looks like "-out tiff -c 7 -o DATADIR1\#.tif DATDIR2\*.gif" right? But nconvert -info shows Compression: uncompressed. Only -c 8 has any effects -> Compression CCIT G3.
To be ble to save in G3 or G4, the picture must B&W, so try with -binary
Pierre.
Markus_S
Posts: 4
Joined: Wed Jul 23, 2008 7:53 am

Post by Markus_S »

Hi and sorry,
I may be stupid :? but still no effects. which option to use with -binary? Any rules for placing -binary in the command before -o after?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

Markus_S wrote:Hi and sorry,
I may be stupid :? but still no effects. which option to use with -binary? Any rules for placing -binary in the command before -o after?
do you have tried -binary nodither
Pierre.
Markus_S
Posts: 4
Joined: Wed Jul 23, 2008 7:53 am

Post by Markus_S »

Yeah I didi almost all :) I have tried with XnView and exported the script options (in Read/Write Write TIFF > CCIT G4 and to Binary > dither) and it worked fine. Then I ran the script command with nconvert and again I received an uncompressed file but in the exported command there is no "-c" option.

Here is there from Xnview exported script command:
"nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out tiff -in gif -n 16 2118265871 16 -o OUTDIR -binary pattern INDIR\##.gif "
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

so could you send your gif to test?
Pierre.
Post Reply