Custom Vehicles
Vehicle File Converters
srf2png
Convert one of Garmin's .srf vehicle files (or one you've created) to a .png with the 72 vehicle images side-by-side, so you can make your own custom vehicle. I've only tested this with a nüvi 660!
Depending on the version of the .srf file, the generated .png will be 2880x150 or 2881x160 pixels. The newer versions have 36 images of 80x80 pixels for the 3D perpsective across the top, and 36 images of 70x70 for the overhead perspective below that. The bottom right 360x70 rectangle is unused. Older versions have 80x80 images for the overhead perspective and an unused 1x160 rectangle along the right edge.
The .png will have alpha transparency for the unused (or shadow) portions of the vehicle images.
Please send feedback/note email to "nuvi" @ my domain name.
png2srf
Convert your modified (or from-scratch) .png file back into a .srf file for your nüvi. I've only tested this with a nüvi 660!
Uploaded .png files should be either 2880x150 or 2881x160, and need to be 24-bit color plus alpha transparency. You're welcome to try other color depths, but I doubt the results would look very good.
Please send feedback/note email to "nuvi" @ my domain name.
SRF file format details
I haven't figured out what every little byte does, but here's the rundown of the SRF file format.
-
File Header
- 16 bytes - string - "GARMIN BITMAP 01"
- 64 bytes - four 32-bit ints, [4, 4, 2, 5] -- purpose unknown
- 7 bytes - PString - "578"
- 4 bytes - 32-bit int, [6] -- purpose unknown
- 8 bytes - PString - version number ("1.00", "2.00", "2.10", or "2.20")
- 4 bytes - 32-bit int, [7] -- purpose unknown
- 16 bytes - PString - "006-D0578-XX" (where "XX" changes) -- I assume this is Garmin's product code?
-
3D Perspective Image Header
- 12 bytes - three 32-bit ints, [0,16,0] -- purpose unknown
- 2 bytes - 16-bit int -- height of image (just the 3D section, so it's 80)
- 2 bytes - 16-bit int -- width of image (just the 3D section, 2880 or 2881)
- 2 bytes - [16, 8] -- purpose unknown
- 2 bytes - 16-bit int -- byte length of each line of image RGB data (16-bit RGB), so "width * 2"
- 4 bytes - all zeroes -- purpose unknown
-
3D Perspective Image Alpha Mask
- 4 bytes - 32-bit int, [11] -- Might specify the type of data that follows?
- 4 bytes - 32-bit int, length of following data (width*height of 3D section)
- width*height bytes - alpha mask data, 0 = opaque, 128 = transparent (across, then down)
-
3D Perspective Image RGB Data
- 4 bytes - 32-bit int, [1] -- Might specify the type of data that follows?
- 4 bytes - 32-bit int, length of following data (width*height*2 of 3D section, as the RGB data is 16-bit)
- width*height*2 bytes - RBG values as "rrrrrggggg0bbbbb" bits (across, then down)
-
Overhead Perspective Image Header
- Same as 3D image header, but width and height are for the overhead section -- 2881x80 for version 2.00 images, and 2520x70 for version 2.10 and 2.20 images.
-
Overhead Perspective Image Alpha Mask
- Same as 3D image alpha mask, but width and height are for the overhead section.
-
Overhead Perspective Image RGB Data
- Same as 3D image rgb data, but width and height are for the overhead section.
-
Footer
- 56 or 136 bytes - all 0xFF -- these seem to pad the file to a particular block size. Version 1.00 and 2.00 files use 136 bytes; newer versions use 56 bytes.
- 1 byte - checksum byte -- use this byte to adjust so that the ascii sum of all bytes in the file is a multiple of 256. (sum % 256 == 0)
Notes: all numbers are stored little-endian, I believe all the numbers are unsigned, the "PString" I describe is a 32-bit integer containing the string length (excluding the integer) followed by the characters of the string, and the version 1.00 and 2.00 files use the 2881x160 size.