I want to use the System.Drawing.Imaging.EncoderParameters into some Progress code but whatever I try I always get an error (what error depends on how I try it) with the following code
define variable oEncoderParameters as System.Drawing.Imaging.EncoderParameters no-undo.define variable oEncoderParameter as System.Drawing.Imaging.EncoderParameter no-undo.define variable v-PCcompress as integer no-undo.assign oEncoderParameter = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder:Quality, v-PCcompress) oEncoderParameters = new System.Drawing.Imaging.EncoderParameters(0). assign oEncoderParameters:param = oEncoderParameter.
I get the error 'You cannot assign a scalar value into a .NET array object'I also tried to use assign oEncoderParameters:param = oEncoderParameter. but that gives also an error.The code I've taken this from is:EncoderParameters encoder_params = new EncoderParameters(1); encoder_params.Param = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, compression);I need the oEncoderParameters because that's a needed input parameter to some other .net method.Someone that can give me a hint?I already found the thread https://community.progress.com/community_groups/openedge_development/f/19/t/1087 but I think that that is no solution for this.Regards
Architect of the SmartComponent Library and WinKit
Aha, that's the way to do something like this!
Thanks this will help me in multiple situations because I had similar problems in the past (but then I had some workaround what I do not have in this case).
Thanks a lot