T O P I C R E V I E W |
EricNat |
Posted - Oct 07 2022 : 09:21:40 I am trying to set the maximum compression on a WEBP save using the ImageMagick plugin. Having trouble getting this Delphi code converted to C++Builder. Specifically, I can't seem to find a Create() method for TIEDictionary. I tried creating it with "new" as well but that didn't work either.
ImageEnView1.IO.LoadFromFile( 'D:\Image.png' ); imDict := TIEDictionary.Create(); // HAVING TROUBLE CONVERTING THIS LINE TO C++ imDict.Insert( 'webp:lossless', true ); imDict.Insert( 'webp:method', 0 ); imDict.Insert( 'webp:auto-filter', true ); ImageEnView1.IO.Params.Dict.Insert( 'ImageMagick', imDict ); ImageEnView1.IO.SaveToFile( 'D:\Image_out.webp' );
Thanks, Eric
|
4 L A T E S T R E P L I E S (Newest First) |
EricNat |
Posted - Oct 10 2022 : 22:06:47 Thanks! That did the trick! |
xequte |
Posted - Oct 10 2022 : 17:19:38 Hi Eric
It looks like the C++ definition for TIEDictionary doesn't recognize Delphi default parameters, so they must be specified manually:
imDict = new TIEDictionary(103, false);
Note: hyieutils.hpp must be included ( #include "hyieutils.hpp")
We'll improve this for the next release.
Nigel Xequte Software www.imageen.com
|
EricNat |
Posted - Oct 09 2022 : 14:38:59 no, I get an error:
[bcc32 Error] Main.cpp(144): E2285 Could not find a match for 'TIEDictionary::TIEDictionary()'
When I try that.
Thanks. |
xequte |
Posted - Oct 07 2022 : 19:31:47 Hi Eric
This did not work?
imDict = new TIEDictionary;
Nigel Xequte Software www.imageen.com
|