How to import a bitmap (.bmp) and store in a variable

Hi all,

Seemed simple enough but I’m having trouble importing a bitmap into Studio. I need to pull a file in and store it into a variable, and was trying to do it without invoking code. I tried Load Image and other similar activities but I always get the error that the file I’ve pulled in and the variable I’m storing it in don’t match. I’ve changed the variable i’m storing the output into as “bitmap” but that doesn’t seem to work. Any ideas?

(The error I get on my Output Variable: Invalid L-value expression, the provided expression’s Type must exactly match the type T of VisualBasicReference or LambdaReference.)

Hi, welcome to the uipath community forum
Instead of creating the variable from variables pane , use ctrl+k , at the output of the activity and create the variable there
This will create the variable type that need to be there at that output

yep - vinay is right.
when you import a JPG or BMP or whatever … you can store it in a variable … but the vairable needs to be of type “Image”

… actually to be more acurate it needs to be of the type UiPath.Core.Image
… but remembering all of that is a pain
… so use the ‘Load Image’ activity … drag that into your Sequence and then put your cursor in the ‘Output’ field … then, as Vinay says, press Ctrl + K and then the correct var type is automatically created.