Code Monkey home page Code Monkey logo

base64-img's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

base64-img's Issues

Promise support

I would like to add support for using promises instead of relying on callbacks.

Memory leaks when used multiple times in a loop

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'

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

base64(

in base64 function
fs.readFile is not a function

base64Img.requestBase64 succeeds. But how can I get the string our of the request?

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)
	})
}

image

Module not found: Error: Can't resolve 'fs'

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?

TypeScript not supported

Try npm install @types/base64-img if it exists or add a new declaration (.d.ts) file containing declare module 'base64-img';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.