sbinary | Library for describing binary formats for Scala types | Serialization library
kandi X-RAY | sbinary Summary
kandi X-RAY | sbinary Summary
SBinary is in the Scala Tools Repository. If you are using sbt with Scala 2.7.7: val sbinary = "org.scala-tools.sbinary" %% "sbinary" % "0.3". For Maven users, use "sbinary_2.7.7" for the artifact ID.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sbinary
sbinary Key Features
sbinary Examples and Code Snippets
Community Discussions
Trending Discussions on sbinary
QUESTION
I have a database storing Binary JPEG Images with two different file signatures (FFD8FFE0 and FFD8DDE1) and I would like to convert them into Base64 so I can use them in another application (Power BI). The data is stored as an IMAGE field type, however I only receive the data in a CSV file and import into my tool as a string and work with it from there.
For the file signature FFD8FFE0, I have no problem converting using the below code (from another Stack post - thank you):
...ANSWER
Answered 2021-Sep-23 at 16:58You are mapping the results from the database incorrectly, this field should be byte[], not string.
I assume you are receiving a hexadecimal representation of the bytes, which you could convert to bytes then convert to base64 as you attempted (Convert.ToBase64String(bytes)
).
Try using EF-code first to read from table and define the image property as byte[].
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sbinary
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page