Now i fully know how 2 convert the digit as well as strings in binary;But is it possible to convert images in binary?
Now i fully know how 2 convert the digit as well as strings in binary;But is it possible to convert images in binary?
AbHHinaay
What do you mean with binary?
If you can convert a single byte to a visual binary representation, you can do so with anything (I might be missing your point tho)!
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
I just want to convert the image in the form of 1's and 0's.
AbHHinaay
>>I just want to convert the image in the form of 1's and 0's.
A byte is a byte, just read a byte from whatever input you want and print out the corresponding list of 0's and 1's using bitwise operators, it doesn't matter if the input is a number, a string, or a stream of pixels. It's all the same where you're concerned :-)
*Cela*
>I just want to convert the image in the form of 1's and 0's.
An image which is stored on your harddisk is already stored in binary. The image is stored as a collection of bits on your harddisk. Or do you mean digitizing images, like a scanner does?