Apply curve with NConvert?

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

Moderators: XnTriq, helmut, xnview

stalker
Posts: 3
Joined: Fri Jan 05, 2024 5:52 pm

Apply curve with NConvert?

Post by stalker »

Hello (X)NConvert users and developers.

I know XnConvert and XnView GUI. I need do some operation in batch, in Linux version of NConvert. Exactly, I want apply a color curve to dozens of images. I found a curve perfect for my needs and... what now? I know I can save it as .xbs file, to check curve parameters. But how to use it with NConvert? Saving as .bat file doesn't help much because curve's parameters aren't included.

Can anyone give me some hints?
cday
XnThusiast
Posts: 4017
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Apply curve with NConvert

Post by cday »

Not currently supported as far as I know... :(

But you could request that support be added, and Pierre has been in the past responded to a number of requests to port XnView functions to NConvert, although I'm not sure how easy it would be to add support for the curves function?
cday
XnThusiast
Posts: 4017
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Apply curve with NConvert

Post by cday »

If you have an immediate need you might check imagemagick which supports more functions, distinguishing between applying a curves adjustment and drawing a curve... :wink:
stalker
Posts: 3
Joined: Fri Jan 05, 2024 5:52 pm

Re: Apply curve with NConvert

Post by stalker »

Thank you. I use Imagemagick sometimes but it could be very handy to "design" the curve in XnView and then use it in NConvert.
cday
XnThusiast
Posts: 4017
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Apply curve with NConvert

Post by cday »

stalker wrote: Fri Jan 05, 2024 6:56 pm I use Imagemagick sometimes but it could be very handy to "design" the curve in XnView and then use it in NConvert.
Yes, Pierre?
stalker
Posts: 3
Joined: Fri Jan 05, 2024 5:52 pm

Re: Apply curve with NConvert

Post by stalker »

I found another approach, very around, but works. I use Curves action in XnConvert, save preset to .xbs file, read curve(s) parameter, calculate polynomial coefficients using IM and Gnuplot functions described here: https://imagemagick.org/Usage/color_mods/#curves and then use convert to apply the polynomial.

Very simple, isn't it? :D