RP English
Roberto Piola
Tom Tom
  • Screen Dump


    Sorry, English only page

    Screen dumps

    If you want to include a screenshot of the tomtom in your pages, like:
    , the easy way for taking it is connecting to the shell via serial cable or bluetooth and issue a command like:
    cat /dev/fb >/mnt/sdcard/screenshot.dump
    This will copy the contents of the framebuffer into a file screenshot.dump on your SD card, then connect your TomTom via the USB cable or extract the card and insert it into a standard reader (I know that the manual says that you must NEVER do that, but I do it quote often, with a copy of the original card). Now you must convert it into a format that can be read by some graphics manipulation program and published on the web.

    If you want to try it, I'm currently placing that command in a script: screendumper.zip: download it and try it.

    I wrote a simple converter that reads the .dump files and creates a .ppm file that can be read by many programs, like the GIMP, or PaintShop Pro.

    Here is the source code:
    /* Code by Roberto Piola, http://www.ilpiola.it/roberto/tomtom
       The code is provided as-is without any warranty. You can use it for whatever you want, but please give credit to the author.
       If you want to redistribute it or include it in some other software, you must include a link to my site in the documentation.
       If you want to use it on a tomtom model that has a different resolution (i.e.: 480x272), you must change the TWO lines marked as "CHANGE RESOLUTION"   */
    #include <stdlib.h>
    #include <stdio.h>
    main(int argc,char**argv)
      char outfname[1024];
      unsigned short c;
      int w;
        printf("usage: convert-from-rider dumpfile outputfile\n.ppm is automatically added to output\n");
        printf("unable to open %s for reading\n",argv[1]);
        printf("unable to open %s for writing\n",outfname);
      fprintf(fo,"P3\n# dumped from TomTom\n320 240\n255\n"); /* CHANGE RESOLUTION 320 240 HERE */
      for(w=0;w<320*240;w++) /* CHANGE RESOLUTION 320X240 HERE */
        fprintf(fo,"%d %d %d\n",(c>>11)<<3,((c>>5) & 0x3f) << 2,(c& 0x1f) <<3);

    Simply download it, save it into convert-from-rider.c, compile it with your favorite compiler and run as:
    convert-from-rider screenshot.dump screenshot
    It will create a file called screenshot.ppm, that yo can now open and convert into more standard formats, like .gif or .jpg. I chose .ppm because it is very easy to encode.


    Locations of visitors to this page

    Impostazioni cookies