Convert to binary and save to database

조회 수: 3 (최근 30일)
oztex smiith
oztex smiith . 2021년 11월 10일
댓글: oztex smiith . 2021년 11월 11일
For my recent project, i will have to deal with plenty of images. With a view to making server respond faster, I decided to save images in the form of binary numbers. Is there any way I could create a binary converter with the help of math algorithm?

채택된 답변

Yongjian Feng
Yongjian Feng 2021년 11월 10일
Are you talking about image formats here? For binary, do you mean bitmap?
  댓글 수: 2
oztex smiith
oztex smiith 2021년 11월 11일
Actually, i just found a node.js package for the same conversion: and the website,
i have gone through the working, this is the code i found for image to binary conversion:
var file = inputElement.files[0];
var reader = new FileReader();
reader.onloadend = function() {
console.log('Encoded Base 64 File String:', reader.result);
/******************* for Binary ***********************/
var data=(reader.result).split(',')[1];
var binaryBlob = atob(data);
console.log('Encoded Binary File String:', binaryBlob);
Once, I will get the binary conversion, I will save binary into database. I'm going to implement this tomorrow and I'm optimistic that will find the solution.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)


Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by