CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    31

    Good website for file specifications?

    Does anyone know of any good websites that list several different file specifications? (ex. .txt, .jpg, .xxx)

    I am wanting to read files using binaryreader and want to know which parts of the file contain what information (like file header contents).

    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: Good website for file specifications?

    Quote Originally Posted by Tineras
    Does anyone know of any good websites that list several different file specifications? (ex. .txt, .jpg, .xxx)
    You mean file extensions? Here, for example: http://filext.com/

  3. #3
    Join Date
    Feb 2006
    Posts
    31

    Re: Good website for file specifications?

    I'm actually wanting to read and edit the Hex data in the file headers of various file types. For example, if I want to find out the image width of a .jpg file, my program would use BinaryReader to get the Hex info from the file header that tell me that.
    Last edited by Tineras; December 20th, 2007 at 11:36 AM. Reason: Spelling Error

  4. #4
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: Good website for file specifications?

    Quote Originally Posted by Tineras
    I'm actually wanting to read and edit the Hex data in the file headers of various file types. For example, if I want to find out the image width of a .jpg file, my program would use BinaryReader to get the Hex info from the file header that tell me that.
    Sure. But in this case, you need not only know which type of file is behind an extension, but also a the file format (and the site I showed you usually has links to the format descriptions of the various file types). However - there a thousands of different file types - I wonder how you would want to deal with all of them?

  5. #5
    Join Date
    Aug 2005
    Location
    LI, NY
    Posts
    576

    Re: Good website for file specifications?

    http://www.w3.org/ seems to cover a wide range of file format specifications related to the web. For .jpg files you'd want to look up the JFIF specification.

    Anyway, google is your friend, and so are 3rd-party libraries.
    - Alon

  6. #6
    Join Date
    Jan 2002
    Location
    Houston, TX
    Posts
    1,421

    Re: Good website for file specifications?

    Another good resource I use a lot is Wotsit.

    Hope it helps.
    Be sure to rate those who help!
    -------------------------------------------------------------
    Karl - WK5M
    PP-ASEL-IA (N43CS)
    PGP Key: 0xDB02E193
    PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

  7. #7
    Join Date
    Nov 2007
    Posts
    613

    Re: Good website for file specifications?

    I tried to find such sites without too much success. Here is the best I found, but only has a handful of file formats:
    http://www.daubnet.com/formats/

    If you find a better one post it here, I'm curious too.

  8. #8
    Join Date
    Feb 2006
    Posts
    31

    Re: Good website for file specifications?

    Quote Originally Posted by gstercken
    Sure. But in this case, you need not only know which type of file is behind an extension, but also a the file format (and the site I showed you usually has links to the format descriptions of the various file types). However - there a thousands of different file types - I wonder how you would want to deal with all of them?
    I'm sorry, I didn't know that it had detailed information. I guess I just wasn't paying close attention.

  9. #9
    Join Date
    Feb 2006
    Posts
    31

    Re: Good website for file specifications?

    I surprised there are more databases with this information.

    I found some info on http://www.wotsit.org

    This is the kind of information I was looking for:

    Code:
        X'FF', SOI
             X'FF', APP0, length, identifier, version, units, Xdensity, Ydensity, Xthumbnail,
              Ythumbnail, (RGB)n
                  length     (2 bytes)  Total APP0 field byte count, including the byte 
                                        count value (2 bytes), but excluding the APP0 
                                        marker itself
                  identifier (5 bytes)  = X'4A', X'46', X'49', X'46', X'00' 
                                        This zero terminated string ("JFIF") uniquely 
                                        identifies this APP0 marker.  This string shall 
                                        have zero parity (bit 7=0).
                  version    (2 bytes)  = X'0102'
                                        The most significant byte is used for major 
                                        revisions, the least significant byte for minor 
                                        revisions. Version 1.02 is the current released 
                                        revision.
                  units      (1 byte)   Units for the X and Y densities.
                                        units = 0:  no units, X and Y specify the pixel 
                                             aspect ratio
                                        units = 1:  X and Y are dots per inch
                                        units = 2:  X and Y are dots per cm
                  Xdensity   (2 bytes)  Horizontal pixel density
                  Ydensity   (2 bytes)  Vertical pixel density
                  Xthumbnail (1 byte)   Thumbnail horizontal pixel count
                  Ythumbnail (1 byte)   Thumbnail vertical pixel count
                  (RGB)n     (3n bytes) Packed (24-bit) RGB values for the thumbnail 
                                        pixels, n = Xthumbnail * Ythumbnail
    Thank you all. I will keep searching too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured