Page 1 of 2

Resize the image without losing the quality of the image

Posted: Fri Feb 23, 2018 6:29 am
by punith8626
Hi,

I have a multi tiff image and I wanted to convert it to PNG
I have used below command to covert and resize. The out image loses its quality text is not visible properly.

Code: Select all

nconvert -page 0 -overwrite -out png -ratio -rflag orient -resize 50% 50% -o C:\Users\p\Desktop\tiff\1.png  C:\Users\p\Desktop\tiff\abc.tif
Is there any way to convert image without losing the quality ?

Regards
Punith

Re: Resize the image without losing the quality of the image

Posted: Fri Feb 23, 2018 7:49 am
by cday
punith8626 wrote:I have a multi tiff image and I wanted to convert it to PNG.

I have used below command to covert and resize. The out image loses its quality, text is not visible properly.

Code: Select all

nconvert -page 0 -overwrite -out png -ratio -rflag orient -resize 50% 50% -o C:\Users\p\Desktop\tiff\1.png  C:\Users\p\Desktop\tiff\abc.tif
Is there any way to convert image without losing the quality?
You are reducing the pixel dimensions of the image which will tend to reduce the quality, resampling using one of the -rtype options may help...

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 11:16 am
by punith8626
How do i darken the text present in the image ?

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 11:33 am
by cday
punith8626 wrote:How do i darken the text present in the image ?
You have various options including altering brightness, contrast or using a levels adjustment...

You have a copy of the NConvert help file, presumably?

If you wish and are able to, you could upload an example image.

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 12:20 pm
by punith8626
I need to make the marked area darker.
Here is the problem I am opening the image in internet explorer where image text is getting blur and not able to read when i resize.

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 12:57 pm
by cday
Thanks for uploading an example image: may I make two comments:

First, in general in a case like this it would be easiest to find the optimum actions, and values to be used when relevant, using a windowed software such as XnView MP or XnView Classic, as settings can be tried quickly and the result seen immediately.

Second, do you really need to resize the original image (reduce the pixel dimensions), which will often inevitably reduce the image quality ? If the file size is an issue, there may be better ways of obtaining the result you need: I have attached a TIFF with CCITT G4 'Fax' lossless compression, which will open with image quality identical to the original image, but has a very much reduced file size.

Edit:

Your TIFF file is black and white (1-bit colour depth) which precludes darkening using the above methods, however there may be a way of obtaining some improvement by other means such as use of a filter. If he has time, XnTriq could possibly advise...

Otherwise, scanning or faxing the original paper with different settings would help, which may of course be outside your control.
--

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 2:30 pm
by punith8626
Thank you for your reply.
I am not resizing the image.When i try to open the same image in internet explorer,I am not able to read the image properly.
Here is the screenshot

The reason for darkening the text is in internet explorer I am not able to see the text.If you open the same text in internet explorer you can see the issue.

Could you please provide me the command that you have used to get less size CCIT Compression ?

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 3:29 pm
by cday
punith8626 wrote:When i try to open the same image in internet explorer,I am not able to read the image properly.

The reason for darkening the text is in internet explorer I am not able to see the text. If you open the same text in internet explorer you can see the issue.
I don't have Internet Explorer the web browser, you using a web browser to view files??
Could you please provide me the command that you have used to get less size CCIT Compression ?

Code: Select all

-c value          : Compression number
              default : 0 (uncompressed)
              PDF    : 1 (Fax), 2 (Rle), 3 (LZW), 4(ZIP), 5 (JPEG)
              TIFF    : 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
For TIFF with CCITT G4 compression use -c 7

Re: Resize the image without losing the quality of the image

Posted: Mon Feb 26, 2018 7:45 pm
by XnTriq
punith8626 wrote:I am not resizing the image.When i try to open the same image in internet explorer,I am not able to read the image properly.
Here is the screenshot

The reason for darkening the text is in internet explorer I am not able to see the text.If you open the same text in internet explorer you can see the issue.
Internet Explorer doesn't (always) use interpolation (high-quality zoom) for downsizing binary (black & white) images. You need to either hit Refresh in IE or increase the color depth of the image to at least 8-bit grayscale.

Re: Resize the image without losing the quality of the image

Posted: Fri Apr 06, 2018 6:44 am
by punith8626
XnTriq wrote:
punith8626 wrote:I am not resizing the image.When i try to open the same image in internet explorer,I am not able to read the image properly.
Here is the screenshot

The reason for darkening the text is in internet explorer I am not able to see the text.If you open the same text in internet explorer you can see the issue.
Internet Explorer doesn't (always) use interpolation (high-quality zoom) for downsizing binary (black & white) images. You need to either hit Refresh in IE or increase the color depth of the image to at least 8-bit grayscale.
Could you please provide me the command on how to increase the colordepth of image.?

Re: Resize the image without losing the quality of the image

Posted: Fri Apr 06, 2018 8:30 pm
by XnTriq
punith8626 wrote:Could you please provide me the command on how to increase the colordepth of image.?
cday?
[color=green]xnconvert.exe -help[/color] wrote:

Code: Select all

-grey num         : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)
jimbob ([url=http://newsgroup.xnview.com/viewtopic.php?p=1502#p1502]Make a droplet to convert color to grey as a BAT file[/url]) wrote:I successfully use the command line within a Windows DOS prompt to convert a color JPG to a greyscale JPG:

Code: Select all

nconvert -quiet -o output.jpg -grey 256 -out jpeg input.jpg

Re: Resize the image without losing the quality of the image

Posted: Fri Apr 06, 2018 8:54 pm
by cday
XnTriq wrote:
punith8626 wrote:Could you please provide me the command on how to increase the colordepth of image.?
cday?
[color=green]xnconvert.exe -help[/color] wrote:

Code: Select all

-grey num         : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)
jimbob ([url=http://newsgroup.xnview.com/viewtopic.php?p=1502#p1502]Make a droplet to convert color to grey as a BAT file[/url]) wrote:I successfully use the command line within a Windows DOS prompt to convert a color JPG to a greyscale JPG:

Code: Select all

nconvert -quiet -o output.jpg -grey 256 -out jpeg input.jpg
To increase colour depth, presumably these although I don't think ever used them myself:

Code: Select all

-grey num         : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)

-truecolors
-truecolours      : Convert in True Colors
I'm attaching a copy of the NConvert 7.00 Help file, you really should have one to consult.

Re: Resize the image without losing the quality of the image

Posted: Fri Apr 06, 2018 9:45 pm
by XnTriq
cday wrote:To increase colour depth, presumably these although I don't think ever used them myself:

Code: Select all

-grey num         : Convert in Grey Scale (256, 128, 64, 32, 16, 8 or 4)

-truecolors
-truecolours      : Convert in True Colors
I'm attaching a copy of the NConvert 7.00 Help file, you really should have one to consult.
I actually had consulted the help (nconvert.exe -help >nconvert.txt) for my previous post (see quote).
The reason why I was asking for your assistance is that the sample was deleted by the OP before I joined the thread.

Anyhow — the following command does the trick for me:

Code: Select all

nconvert.exe -o test.png -grey 256 -out png file0_0_CCITT_G4.tif

Re: Resize the image without losing the quality of the image

Posted: Sat Apr 07, 2018 6:06 am
by cday
XnTriq wrote:I actually had consulted the help (nconvert.exe -help >nconvert.txt) for my previous post (see quote).
The reason why I was asking for your assistance is that the sample was deleted by the OP before I joined the thread.
My remark wasn't addressed at you... :wink:

Re: Resize the image without losing the quality of the image

Posted: Sat Apr 07, 2018 6:45 am
by XnTriq
cday wrote:My remark wasn't addressed at you... :wink:
Oh, got it :mrgreen: