firereader | Firereader : A feed reader built with Firebase and AngularJS | Authentication library
kandi X-RAY | firereader Summary
kandi X-RAY | firereader Summary
Firereader is a fully functional, real-time content aggregator built using Angular and Firebase. It contains a fully functional client in the app/ directory, and a service that parses RSS data and pushes it into Firebase in the service/ directory.
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 firereader
firereader Key Features
firereader Examples and Code Snippets
Community Discussions
Trending Discussions on firereader
QUESTION
I have a requirement to convert an input image (blob) to base64 image. Im aware the size will increase by approx 1.37.
However i have noticed when using the firereader.readAsDataUrl
the size of the image is extremely large when compared to the built in base64 command line tool you have on macOS.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
Steps to reproduce:
Download this free sample image https://wall.alphacoders.com/big.php?i=685897 make sure to click the Download button (Downlaod Original 8000x600). Do not use right click save as because the image will be compressed
Use the jsfiddle to pick the above downloaded image and check the console log for the size of the base 64. https://jsfiddle.net/b7nkw8j9/ you can see the size is 11.2mb.
Now if your on mac use the base64 command line tool to convert the above downloaded image to base64 and check the file size there. You will see the base64 size here is. 5.9mb.
base64 -w 0 downloaded_image.jpg > downloaded_image.base64
This is the function i am using in my code to convert an input file image to base64.
...ANSWER
Answered 2019-Jul-05 at 01:50I have 5,882,455 bytes for the FileReader vs 5,882,433 bytes for base64
output, if you add the 22 bytes from data:image/png;base64,
, we're not too far.
However to the question How can i make this more efficient?, just don't use a data URL here. Whatever you've been told you need it too, it was a lie (I'm 99% percent sure).
Instead you should always prefer to work with the Blob directly.
To display it, use a blob URL:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install firereader
open app/js/config.js and set the FIREBASE_URL to your namespace
cd into service/
run npm install to configure dependencies
start feeds.js: FBURL="https://<NAMESPACE>.firebaseio.com/user" SECRET="xxx" node ./feeds.js
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