10000 Return and display blob into img example? · Issue #166 · NathanaelA/nativescript-sqlite · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.
This repository was archived by the owner on Jul 7, 2022. It is now read-only.
Return and display blob into img example? #166
Open
@pchristou

Description

@pchristou

Hi,

I've created a table in Sqlite which has a column of type 'Blob'. I've uploaded images using the "DB Browser" GUI and I'm now looking to retrieve the rows into my nativescript-angular project. I can display the images on the UI if I store the images as base64 strings and simply update the image [src] attribute but I'd prefer to retrieve each rows Blob data and display that instead - I heard base64 data can be 33% larger than binary, plus this is what the blob data type was intended for?

When I retrieve the rows, the blob column for one row looks as follows:

image

How can I convert that into an Image I can display? Any guidance on this would be appreciated as I couldn't find anything suitable in the docs.

Many thanks,
P

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0