+ 1

How to convert image into an binary number using python ?

please can anyone help me to solve my question .I have an image I need to convert that as binary when I gave input as image it should provide binary number..

27th Jun 2018, 3:50 PM
Basavaraju S
Basavaraju S - avatar
7 Answers
0
with open(r"image path.jpg","rb") as f: z=f.read() print(z) Write right extension of your picture I assume that image extension has jpg.
27th Jun 2018, 4:27 PM
Maninder $ingh
Maninder $ingh - avatar
+ 4
I have an image I need binary number of it
27th Jun 2018, 4:03 PM
Basavaraju S
Basavaraju S - avatar
+ 1
ok thanks but will it provide binary format can u please explain
27th Jun 2018, 4:29 PM
Basavaraju S
Basavaraju S - avatar
+ 1
we are doing software for clothing design if we give an image as input it should convert it as and then it can process it
27th Jun 2018, 5:19 PM
Basavaraju S
Basavaraju S - avatar
0
What do you mean with "convert image to binary number"? Either are data (group of bytes), change only like will be interpretated.... Can you explain your goal?
27th Jun 2018, 3:55 PM
KrOW
KrOW - avatar
0
Basavaraju S Your question hasnt sense... If your want interpret an image data like an integer you can do it but its unuseful and can result in strange results. If your image its 100kb weight, you will have an an int with value up to 2^1024100 that its a really large number also for crypto purposes... I repeat.. What you developing? Why you have need of similar feature?
27th Jun 2018, 4:39 PM
KrOW
KrOW - avatar
0
How I convert any image to binery
14th Nov 2019, 12:51 PM
Diwakar Tripathi