0

So, I am currently using an API using curl that expects a base64 string as a body. This base64 has to be in the JPG format, though. The images that I am uploading are online so the most ideal solution would look something like this:

var url = "www.someimg.nl/pic.png";

var base64png = Base64.Encode(url);
var base64jpg = Base64.Convert(base64png, "JPG");

//Do my curl here

All the solutions that I see usually save the file while they are converting it. I do not want to do this as I do not want a local copy of every image handled by my program. Is there any way to do what I am describing?

Cookie
  • 23
  • 3
  • Could you check [this ](https://stackoverflow.com/a/17133012/15136666)answer and see if it helps? – Eroo36 Jan 27 '22 at 20:33
  • Could you check [this](https://stackoverflow.com/a/17133012/15136666) answer and see if it helps? – Eroo36 Jan 27 '22 at 20:35

0 Answers0