jpeg quality bug (png -> jpeg, tiff -> jpeg)

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

Moderators: XnTriq, helmut, xnview

Post Reply
dubiousdawg
Posts: 4
Joined: Thu Nov 17, 2011 6:05 pm

jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by dubiousdawg »

In cetain cases, the "-out jpeg" option seems to override the quality option.

When converting png -> jpeg or tiff -> jpeg with "-out jpeg" and "-q 100", nconvert will produce a low quality image with clear jpeg artifacts.
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by xnview »

Could you send comand line & sample to reproduce?
Pierre.
dubiousdawg
Posts: 4
Joined: Thu Nov 17, 2011 6:05 pm

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by dubiousdawg »

pierre,

thx for the response. after looking into it a bit further, it seems like it was still converting it into a .png without the -out jpeg flag, even though i specified the jpeg extension

however, there are still issues with the jpeg step. they are rather drastic for this particular image. see below"

original image (png)
Image

Code: Select all

nconvert -out jpeg -q 90 -o crop_nconvert.jpg crop.png
Image

Code: Select all

nconvert -out jpeg -q 100 -o crop_nconvert1.jpg crop.png
Image

And here are the two examples that convert produces at 90 and 100 quality
Image
Image
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by xnview »

It seems that convert use subsampling 1x1,1x1,1x1 and not 2x1,1x1,1x1 as default
You can change it by using

Code: Select all

-subsampling 2
Pierre.
dubiousdawg
Posts: 4
Joined: Thu Nov 17, 2011 6:05 pm

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by dubiousdawg »

Thanks for the response, Pierre! It was indeed the subsampling.
dubiousdawg
Posts: 4
Joined: Thu Nov 17, 2011 6:05 pm

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by dubiousdawg »

Pierre, is there a way to turn subsampling off completely?
User avatar
xnview
Author of XnView
Posts: 43442
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: jpeg quality bug (png -> jpeg, tiff -> jpeg)

Post by xnview »

dubiousdawg wrote:Pierre, is there a way to turn subsampling off completely?
no
Pierre.
Post Reply