Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Bit viewer/editor for peeking at PNG format

  1. Feb 26, 2005 #1

    DaveC426913

    User Avatar
    Gold Member

    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.
     
  2. jcsd
  3. Feb 26, 2005 #2

    dduardo

    User Avatar
    Staff Emeritus

  4. Feb 26, 2005 #3

    DaveC426913

    User Avatar
    Gold Member

    I don't know enough C to do much with it. I'll probably write it in a lang more familiar, like Visual Basic.
     
  5. Feb 26, 2005 #4

    dduardo

    User Avatar
    Staff Emeritus

    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: Feb 26, 2005
  6. Feb 27, 2005 #5

    DaveC426913

    User Avatar
    Gold Member

    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.
     
  7. Feb 27, 2005 #6

    dduardo

    User Avatar
    Staff Emeritus

    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. Feb 27, 2005 #7

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

  9. Feb 27, 2005 #8

    dduardo

    User Avatar
    Staff Emeritus

    Sure you can look at the binary data, but that won't do you any good unless you can decompress the file.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Bit viewer/editor for peeking at PNG format
  1. TextPad Editor (Replies: 3)

  2. PS viewer (Replies: 6)

  3. Good free PDF editor? (Replies: 1)

  4. Microsoft word viewer (Replies: 3)

  5. 3D Graphic editor (Replies: 5)

Loading...