Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Results 1 to 10 of 133

Hybrid View

  1. #1
    Navigation software Moderator kunix's Avatar
    Join Date
    Sep 2011
    Location
    Belarus
    Posts
    908
    Rep Power
    440

    Default

    Quote Originally Posted by testlelelala View Post
    To be clear, i would add that the XXX header need to be "overwritten" to whatever is at the beginning, and NOT inserted if you "insert" you move the data and loose the original absolute offset position, and it won't work.
    Yes, of course. I was doing it by
    1) calculating the maximum header size that definitely doesn't overlap the subfile bodies (=max(offset_of_header[i] + header_size[i]))
    2) copying the calculated amount of bytes starting from header XXX to offset 0.
    Of course, we could do something more subtle like calculating the exact size of header XXX in each case. But it would require knowledge of IMG format much deeper than I have. I'm an absolute IMG-noob, as I said.

  2.    Advertissements


  3. #2
    Member
    Join Date
    Aug 2013
    Location
    A
    Posts
    24
    Rep Power
    70

    Default

    The header size is located in the first two bytes of each header.
    Example: When you found "GARMIN RGN" before that you see two bytes 7D 00 it means x7D which after conversion to decimal is 125 bytes.
    Analog with LBL (xEC-->236 bytes), NET(x64-->100 bytes) and NOD(x3F-->3 bytes)
    The only one "odd" is the TRE header that is larger that what you see in the first two bytes, because it could change with copyright info, nevertheless this extra info is not necessary, you could only grab the size that you get from the first two bytes.

 

 

Bookmarks

Posting Permissions

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