Converting Bitmap to text with as less characters as possible C#

  Kiến thức lập trình

I am using an API call to store the data of some receipts and I want to extend the functionality and be able to somehow store an image that will be used as a signature for the receipt. I tried to store the image in a Bitmap property I created, but I found out that there’s a problem with bitmaps and serialization/deserialization in JSON. I also tried to store the bytes of the image, but I had a significantly large amount of bytes (800.000) and there was a problem sending that info into the server.

Does anybody have a recommendation on how to store an image that could be store with less characters and be serializable/deserializable?

I tried getting the bytes of the img and converting them in a Base64 string but it didn’t help (it only increased the size of the characters)

New contributor

Gouvo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT