Read coefficients for -function from a file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
PaulAThompson
Posts: 26
Joined: 2012-06-23T10:50:36-07:00
Authentication code: 13

Read coefficients for -function from a file

Post by PaulAThompson »

I am trying to read coefficients for a -function Polynomial call from a file. Here is a successful command:

convert C:\Users\Paul\Pictures\2017-12\17096648.JPG ^
-function Polynomial 10.8002128780857,-23.8077779274411,16.0669025317382,-2.05933748238276,0 ^
C:\Users\Paul\Pictures\2017-12\17096648b.JPG

I have those coefficients stored in a file. How can I read the values in?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Read coefficients for -function from a file

Post by snibgo »

Like this:

Code: Select all

convert in.png -function Polynomial "@poly.txt" out.png
snibgo's IM pages: im.snibgo.com
PaulAThompson
Posts: 26
Joined: 2012-06-23T10:50:36-07:00
Authentication code: 13

Re: Read coefficients for -function from a file

Post by PaulAThompson »

Thanks. Works like a charm.
Post Reply