Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6060105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:47:15+00:00 2026-05-23T08:47:15+00:00

I stored my image data in a binary field in sql server and now

  • 0

I stored my image data in a binary field in sql server
and now I need to convert my byte[] data to string

I used

System.Text.Encoding.ASCII.GetString(data);  
System.Text.Encoding.GetEncoding("shift_jis").GetString(data); 
System.Text.Encoding.GetEncoding("euc-jp").GetString(data);    
System.Text.Encoding.Unicode.GetString(data);   
System.Text.Encoding.UTF8.GetString(data); 

and also Convert.ToBase64String

but they encode my data

how can I convert my data byte[] to string whitout any change?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:47:15+00:00Added an answer on May 23, 2026 at 8:47 am

    I think you got something wrong here.

    I need to use this src=”data:image/png;base64,bytes of image”

    It says that the data should be base64 encoded so Convert.ToBase64String is what you want in this case.

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
    AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
    9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
    

    See https://en.wikipedia.org/wiki/Data_URI_scheme

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(In .NET) I have arbitrary binary data stored in in a byte[] (an image,
So I am importing some images stored in SQL image columns, and I need
I have to create BYTE* array that will store some text and binary data
How would you generate an JPG image file containing data fields that are stored
I have to store System.Drawing.Image ImageObject into the database. I have tried with byte[]
can we store binary data to apache cassandra? i'm thinking about storing image to
In my database I have stored images in the image data type, showing up
I'm trying to copy some binary data from my IStream instance (since Gdiplus::Image only
I have a couple of binary files that are used in image processing where
I want to access an image stored in Blackberry, say at location store/home/user/image.png .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.