Bit viewer/editor for peeking at PNG format

  • Thread starter Thread starter DaveC426913
  • Start date Start date
  • Tags Tags
    Bit Format
AI Thread Summary
To parse PNG format files effectively, using the libpng library is recommended, as it provides a low-level interface for handling PNG files in C. For those unfamiliar with C, it may be challenging to implement due to the need for memory addressing with pointers. Visual Basic is not suitable for this task, as it lacks the necessary speed and capabilities for decoding heavily compressed image formats like PNG. Understanding PNG files requires decompressing and transforming the data before accessing pixel information, which cannot be achieved by simply reading the file's bytes. For viewing binary files, tools like UltraEdit and TextPad are suggested, but they won't facilitate the decompression needed to interpret PNG data meaningfully.
DaveC426913
Gold Member
Messages
23,835
Reaction score
7,833
I want to parse PNG format files, and I need to understand what they're doing with the bytes. Dropping a PNG into Notebook shows ASCII versions of the bytes. I need a small freeware viewer tool to examine the bits themselves.

Can someone point me at something I could use?

Also, while I am reading up on PNG format, I could use some direction on practical (or prefereably even visual idiot's guide) interpretation of the format (as opposed to theory).

D.
 
Computer science news on Phys.org
I don't know enough C to do much with it. I'll probably write it in a lang more familiar, like Visual Basic.
 
Low level reading of a png files requires addressing memory using pointers. You can't do that with VB.

Here is what I found on google groups:

"...no VB code seems to be available to fully decode
PNG (or GIF, or JPG for that matter) to screen. Sure, there's C
source available, but nobody seems to want to port it to VB.
The prime reason is probably that these file formats are *heavily*
compressed, and the number-crunching involved in decoding this stuff
(requiring, by the way, floating point calculations) would simply be
too slow in VB."
 
Last edited:
Really? I thought it formatted the pixels in bytes. i.e. each pixel would show as an ASCII value. I guess I was oversimplifying.

Drat. One more stumbling block in the way of my master plan.
 
You have to understand that you compressing the file and doing some other tranformations to the data. Therefore you can't just start reading at the beginning of the file and expecting to see pixel information. You first must decompress and transform the file into ram and then you can read the pixels chunks from memory. VB just doesn't have the speed or capbabilities to do this.
 
Sure you can look at the binary data, but that won't do you any good unless you can decompress the file.
 

Similar threads

Back
Top