Society of Robots - Robot Forum

Software => Software => Topic started by: octagonx on September 17, 2007, 12:56:20 AM

Title: image files question
Post by: octagonx on September 17, 2007, 12:56:20 AM
Is there a program that can view image files as an array of bits?
Title: Re: image files question
Post by: crossroads1946 on September 17, 2007, 12:06:30 PM
Technically, you could do it with a text editor, although you'd probably loose the non-printable characters. It really depends on what the format is. You need to know how many bits are used per pixel, if it stores alpha information or any other info, what kind of compression schemes it uses, etc... What is the image format?
Title: Re: image files question
Post by: dunk on September 17, 2007, 01:00:38 PM
hi octagonx,
most image formats (png or jpeg for example) have some sort of data compression going on so looking at the raw contents doesn't tell you much.
most programming languages have libraries to handle the conversion into usable data for you.
you'll need to search a bit to find one with documentation that you can use with whatever language you are using.

dunk.
Title: Re: image files question
Post by: octagonx on September 18, 2007, 11:30:48 PM
i've tried opening .bmp files using text editor.  And i think, it does resembles how the image looks like. But what I want is to view each character as a value (numbers, hex etc) so i can at perform mathematical operations on them. Thanks for the replies, dunk, crossroads.
Title: Re: image files question
Post by: JesseWelling on September 19, 2007, 12:22:51 AM
I found this... maybe it could help  ???
http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html
Title: Re: image files question
Post by: octagonx on September 19, 2007, 11:15:50 PM
I found this... maybe it could help  ???
http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html

that helps a lot. thanks.