Hey everyvody... I have this crazy idea for a program... I want to be able to load an image (most likely a .jpg) into a java program and then I want the program to print out the binary code that makes up the image and save it to a .txt file. I know how to do the i/o stuff... but I can't think of how to extract the binary code from the image.... Anybody know how to do this?
Jump to Post
I think you would have to create a PixelGrabber which returns an array of ints made from the image. Once you have that, I think you could use this method to convert the ints to binary:
Here is an example of a Pixel Grabber that creates a …
All 4 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.