How to convert Thingworx Image Datatype to String in thingworx Services
Hello @Partha
Please refer following community post ,if it is what you are trying to achieve
https://community.ptc.com/t5/ThingWorx-Developers/Convert-image-to-base64/td-p/557667
In case you have further concern, please feel free to revert and share the your use case .
Thanks
Om Dukiya
Hi @Partha
Can you also give a try to below code to convert Image DataType to String:
var img = me.ImageProp; //When you have defined a property of Type Image
or
var img = MediaEntities["img"].GetImage(); //simply get the image name of pre-defined MediaEntity
var result = base64EncodeString(img); //Define Output type as String
Hi @Partha.
If your feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon