douzi8 / base64-img Goto Github PK
View Code? Open in Web Editor NEWconvert img to base64, or convert base64 to img
convert img to base64, or convert base64 to img
Cannot able to access URL type link.
The below code show error
var base64Img = require('base64-img');
base64Img.base64('https://homepages.cae.wisc.edu/~ece533/images/airplane.png', function (err, data) {
if (err) {
console.log("error", err);
}
console.log(data)
})
Would it be possible to implement sync (blocking) method for retrieving remote images ? Maybe using the sync-request module ?
I'm trying to convert from base64 back to a video file, but I'm getting just the audio and no images. Is it a problem with the plugin, my browser or maybe am not just getting something right?
I would like to add support for using promises instead of relying on callbacks.
Hi,
base64Img.requestBase64(url, function(err, res, body) {
//using body for image processeing
});
When i use this module to covert the url into Data URI, it works fine with as many images but the problem is once the iteration is complete it does not release the memory it used to store the data of the image.
Is there any way where we can delete all the used memory and then move into next iteration of the loop.
P.S. After processing somewhat around 80-100 images, it makes nodejs process to exceed memory upto 1.7 GB
Please help!!!
Unable to resolve module path
from /Users/jkltechconnect/WorkingProjects/ReactNativeProjects/MyTestProject/node_modules/base64-img/base64-img.js
: Module does not exist in the module map
in base64 function
fs.readFile is not a function
Once an image is saved, its permission are being set to read only and i am unable to delete it using fs package.
Usecase:
Upload a file > Use cropping solution which returns result in base64 format > I would like to convert it to actual image before I upload it to server
Using base64Img.requestBase64(url, function(...){...}
returns a response with a 200 result. But it is unclear how to extract the image string out of it. Any suggestions?
const getImages = async () => {
// const sig64 = await image2base64(benImgUrl)
// return sig64
return base64Img.requestBase64(benImgUrl, function(err: any, res: any, body: any) {
console.log(res)
})
}
Hi,
when running the project after installing the package, i am getting this error. from the installed package. I have installed npm fs and npm file-system but i am still getting this error, can anybody help me?
Try npm install @types/base64-img
if it exists or add a new declaration (.d.ts) file containing declare module 'base64-img';
Hi, right now I'm using requestBase64 method and I would like to set a timeout for request. I didn't find any document about it , so how can I set it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.