Extension of my previous thread conversion()?

This is a discussion on Extension of my previous thread conversion()? within the C Programming forums, part of the General Programming Boards category; Now i fully know how 2 convert the digit as well as strings in binary;But is it possible to convert ...

  1. #1
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92

    Extension of my previous thread conversion()?

    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

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    What do you mean with binary?

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    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:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  4. #4
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92
    I just want to convert the image in the form of 1's and 0's.
    AbHHinaay

  5. #5
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    >>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*

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >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?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 02-26-2009, 10:48 PM
  2. Terminating secondary thread from another thread
    By wssoh85 in forum C++ Programming
    Replies: 13
    Last Post: 12-19-2008, 04:14 AM
  3. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 01:17 PM
  4. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  5. pointer to main thread from worker thread?
    By draegon in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2005, 06:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21