ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 C++Builder example for TIEDictionary?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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