target same size than source

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

Moderators: XnTriq, helmut, xnview

asihuay
Posts: 2
Joined: Sun Oct 20, 2013 7:08 pm

target same size than source

Post by asihuay »

I try nconvert with the following commandline:
C:\XnView\nconvert.exe -out tiff C:\sourceimage.jpg
result: C:\sourceimage.tif
the source jpg images are 74 kb but the converted tif image are 1187 kb
I want know how can I get the same or close kb size in converted image than source image
Thanks in advance.
cday
XnThusiast
Posts: 4238
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: target same size than source

Post by cday »

TIFF files that are uncompressed are large so you need to add an appropriate form of compression.

The compression syntax for TIFF is:

Code: Select all

TIFF -c value

where value is one of the following numbers:

1 (Rle), 2 (LZW), 3 (LZW+Prediction)
4 (ZLIB)
5 (CCITT G3), 6 (CCITT G3-2D), 7 (CCITT G4) only B/W
8 (JPEG) only 24/32 bits

If your JPEG is colour you might try 2 (LZW) or 8 (JPEG) for a start, and if your JPEG is black and white 7 (CCITT G4) should be very effective.

You can obtain a listing of the nconvert command line options as a text file by entering

Code: Select all

nconvert  -help > nconvert.txt
Note: You are using NConvert but you have posted in the XnConvert section of the forum...
asihuay
Posts: 2
Joined: Sun Oct 20, 2013 7:08 pm

Re: target same size than source

Post by asihuay »

Thanks cday
now file size are 27 kb
it is my commandline:
NconverterPath & " -out tiff -c 2 -one_strip " & FullPathJPGsourceimage