Nconvert - alpha channel transparency

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

Moderators: XnTriq, xnview

rladjadj
Posts: 1
Joined: Thu Sep 22, 2016 9:50 am

Nconvert - alpha channel transparency

Postby rladjadj » Thu Sep 22, 2016 10:07 am

Hi,

I use NConvert command line tools to generate renditions in a DAM.

After image conversion from png to jpeg format, i waw some weird horizontal lines in the background of the result image.
According to the photographer of the original image, the issue comes from the alpha channel (alpha layer) : the transparency of the alpha channel is not conserved, resulting in the display of these strange lines.

While checking at the forum threads, i found a solution : i added the -merge_alpha parameter to my nconvert calls.
This works well : the results are ok now, for most of my generated renditions !
But, i still get these strange lines if i use the -grey parameter, which i need to generate black and white renditions.

Here are the nconvert command lines i use

- for a colored rendition (OK) :
nconvert -icc -q 100 -icc_in "ISO39 U320 K90.icm" -out jpeg -merge_alpha -resize 10% 10% -o %.Low_Resolution.jpg ${filename}

- for a black and white rendition : (i tested these 3 commands, but it's still KO)
nconvert -grey 256 -out jpeg -merge_alpha -resize 100% 100% -o %.Black_And_White.jpg ${filename}
nconvert -grey 256 -icc_in "ISO39 U320 K90.icm" -out jpeg -merge_alpha -resize 100% 100% -o %.Black_And_White.jpg ${filename}
nconvert -grey 256 -icc -q 100 -icc_in "ISO39 U320 K90.icm" -out jpeg -merge_alpha -resize 100% 100% -o %.Black_And_White.jpg ${filename}

Did anyone here has this issue before ?
Any solution to solve it for the black and white command ?

Thanks !

User avatar
XnTriq
Moderator & Librarian
Posts: 4869
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Nconvert - alpha channel transparency

Postby XnTriq » Thu Sep 22, 2016 8:30 pm

Welcome to the forum!

Have you tried a different order of parameters (i.e. -merge_alpha before -grey 256)?

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

Re: Nconvert - alpha channel transparency

Postby xnview » Fri Sep 23, 2016 7:07 am

please use -merge_alpha before -grey
Pierre.


Return to “NConvert”

Who is online

Users browsing this forum: No registered users and 2 guests