Save Image from variable ICollection<object> to local folder

image

I want to iterate from ImageList variable for saving all image in ImageList into local folder. how to change variable type of object into image variable from the above screenshoot.

Send with Thanks.

HI @jauharul

Can you share the screen shot of the For each property panel?

I think you need to change the type there

Regards
Sudharsan

Here we go…

And what error it shows send that too

This is the error.

@jauharul

We should pass variable of type UiPath.Core.Image to Save Image activity to save the image into local folder.

May I know from where you are getting Image List output ?

yes, i iterate and add image from here. the image store in ImageList Variable.
the next from those list, I want to saved all into my local folder.

image

@jauharul

Ok got it.

Create List variable as below for your requirement.

     System.Collections.Generic.List<UiPath.Core.Image>
1 Like

I create already this variable to store the list of image, and it is success. however it need to be iterated to save the image intolocal folder, the problem occurs.

Hi,

I think it’s better to use List<UiPath.Core.Image> as @lakshman mentioned.
However if you need to use ICollection<Object> for some reason, the following will work.

TypeArgument of ForEach is object.
And Image property of SaveImage is as the following.

CType(item,UiPath.Core.Image)

Regards,

1 Like

@jauharul

Create variable of type List of Images instead of List of Object. You need to Write UiPath.Core.Image instead of Object

1 Like

Thank you, it works

1 Like

thank you lakshman, it it also works and gave me other ways.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.