Bit viewer/editor for peeking at PNG format

  • Thread starter DaveC426913
  • Start date
  • Tags
    Bit Format
In summary: There are a couple of tools that can do this: libpng and zlib. Here are some links to more information:libpng:http://www.libpng.org/zlib:http://zlib.net/
  • #1
DaveC426913
Gold Member
22,444
6,110
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
  • #2
  • #3
I don't know enough C to do much with it. I'll probably write it in a lang more familiar, like Visual Basic.
 
  • #4
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:
  • #5
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.
 
  • #6
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.
 
  • #8
Sure you can look at the binary data, but that won't do you any good unless you can decompress the file.
 

1. What is a bit viewer/editor for PNG format?

A bit viewer/editor for PNG format is a software tool used to view and edit the individual bits of a PNG image. It allows users to see the binary data that makes up the image and make changes to it, such as adjusting the color values or removing specific pixels.

2. How does a bit viewer/editor for PNG format work?

When an image is saved in the PNG format, it is converted into a series of bits, where each bit represents a single pixel in the image. A bit viewer/editor decodes this binary data and displays it in a human-readable format, allowing users to manipulate the image at a more granular level.

3. What are the benefits of using a bit viewer/editor for PNG format?

There are several benefits to using a bit viewer/editor for PNG format. It allows for more precise image editing, as users can directly manipulate the binary data instead of relying on pre-set tools. It also provides a deeper understanding of how PNG images are structured and how different changes affect the final image.

4. Are there any limitations to using a bit viewer/editor for PNG format?

While a bit viewer/editor can be a powerful tool for working with PNG images, it does have some limitations. It requires a basic understanding of binary data and how it relates to images, which can be challenging for those without a technical background. Additionally, some advanced image editing features may not be available in a bit viewer/editor.

5. Can a bit viewer/editor be used for other image formats besides PNG?

Yes, there are bit viewer/editors available for various image formats, including JPEG, GIF, and BMP. However, each format has its own unique structure, so the specific tools and features may vary. It is essential to choose a bit viewer/editor that is compatible with the file type you are working with.

Similar threads

  • Programming and Computer Science
Replies
3
Views
1K
  • Computing and Technology
Replies
2
Views
2K
  • Advanced Physics Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
23
Views
3K
  • Programming and Computer Science
Replies
16
Views
5K
Replies
16
Views
2K
Replies
2
Views
794
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
12K
  • Precalculus Mathematics Homework Help
Replies
13
Views
2K
  • Special and General Relativity
Replies
6
Views
1K
Back
Top