Closed jmadotgg closed 2 years ago
Yes, sorry that the API is not easy to learn, as most of it is auto-generated. In this case, the interlace value has the type InterlaceType
which is literally a uint
in C. The values are defined as follows in the Rust bindings:
InterlaceType_UndefinedInterlace
= 0InterlaceType_NoInterlace
= 1InterlaceType_LineInterlace
= 2InterlaceType_PlaneInterlace
= 3InterlaceType_PartitionInterlace
= 4InterlaceType_GIFInterlace
= 5InterlaceType_JPEGInterlace
= 6InterlaceType_PNGInterlace
= 7How did I figure that out? By cloning this repo, running cargo build
and then finding the bindings.rs
file and looking through that. Yes, not something I expect others to do themselves, but when you're short on time, it works. Sorry it took so long for me to respond. Hope that helps.
Thank you @nlfiedler! No problem. Have a nice day!
Glad to help.
Is it possible to set the interlace scheme? I only found this option in the source code:
What about
magick input.jpg -interlace [SCHEME] output.jpg
? Schemes:I tried to use
wand.set_option("interlace", "Plane")
, but that didn't work either. Could you please tell what theu32
inset_interlace_scheme
is supposed to do? They didn't mention that in their docs.Thank you! :crab: