Open Dorothy-2016 opened 4 years ago
Hi @Dorothy-2016! Unfortunately I'm not aware of a C or C++ implementation. The only other implementation I know of is the one linked in the readme (https://github.com/dtschump/gmic-community/blob/master/include/stanislav_paskalev.gmic). I don't know if it helps.
The OCaml implementation is pretty bare-bones and only uses imperative features of ocaml. It means you should be able to translate most of the code directly using C arrays or equivalent.
a.(i) <- 42
.ref 42
is a call of the function ref
to initialize a ref with the value 42
. The value can be changed with :=
e.g. x := 17
. Reading the current value is done with !x
(nothing to do with a NOT operator).+.
-.
with a dot work only on ocaml floats (= C doubles), whereas the usual +
-
etc. work only on ints.float
function e.g. float 42
gives 42.0
.return
. The last expression evaluated by a function is what's returned.This should cover most of the ocaml oddities :-)
OK, I will try it and thanks very much for your kindly reply!
@Dorothy-2016 hey,dude.Have you ever find an implementation base on c++ or python? if yes, can you share the link. thx alot
Thanks for your nice work first! and I was dealing with the same problem of purple fringe, and I tried your method, it works well most times, except when my picture was big and there's purple things in the picture, it will change the color sometimes. also I want to solve the green purple fringe, so I want try somethings based on your method maybe, but I nevel use OCaml, I was wondering if there's a c/c++ version of your method? Hoping for your reply!