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 6231561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:57:27+00:00 2026-05-24T09:57:27+00:00

So I successfully retrieved my BLOB image from the database and set it to

  • 0

So I successfully retrieved my BLOB image from the database and set it to NSData *content..

content = [[NSData alloc]
       initWithBytes:sqlite3_column_blob(query, 16)
       length:sqlite3_column_bytes(query, 16)];

What I am trying to do is to get this content into a NSString, because I would like to then pass this string to javascript and display the image. I am not exactly sure if this is even possible, but i have read on the link below that you can display images in css/html in base64.
http://mark.koli.ch/2009/07/howto-include-binary-image-data-in-cascading-style-sheets-css.html

The issue I am having is converting my NSData to an NSString so I can then put it into my
UIWebView’s loadHTMLString….I cannot use a UIImage, must be a UIWebView.

Thanks!
Greg

  • 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-24T09:57:28+00:00Added an answer on May 24, 2026 at 9:57 am
    content = [[NSData alloc] initWithBytes:sqlite3_column_blob(query, 16) length:sqlite3_column_bytes(query, 16)]; NSString *path = [webDirectory stringByAppendingPathComponent:@"image.png"]; [content writeToFile:path atomically:NO]; [content release]; 
    

    I was able to figure out my solution by writing the file out to a png. Where webDirectory is your directory of choice

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

Sidebar

Related Questions

I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I am getting Arabic text from server successfully. Retrieved text I want display in
I have used blob datatype for storing image in database. Now, i am trying
Okay, so I have successfully retrieved rows from my db where i have fields
I successfully installed the latest QuantumGrid from DevExpress, but I've never worked with this
Has someone successfully overridden the scoring of documents in a query so that the
Has anyone successfully talked profibus from a .NET application? If you did, what device/card
I am trying to fetch a row from a table in my database, and
I successfully stored and retrieved a reference to an NSManagedObject using the example found
I have some XML data retrieved from a web service that I use to

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.