(no subject)

Page 1.0 of 1.16
  • After some tests, this happens with any file which extension is uppercase, not only JPGs I've noticed first in JPGs trying to open a photo downloaded from my camera, I guess many cameras names their shots in uppercase.

    If in do_new_dialog()x function we change from
    if (strcasestr(fname, ".jpg") != NULL)
    {
    strcpy((char *) strcasestr(fname, ".jpg"), "");
    d_exts[num_files] = strdup(".jpg");
    }

    to

    if (strcasestr(fname, ".jpg") != NULL)
    {
    d_exts[num_files] = strdup(strcasestr(fname, ".jpg"));
    strcpy((char *) strcasestr(fname, ".jpg"), "");
    }

    and do the same for the other extensions,then tuxpaint passes the new dialog withouth error, but then it silently fails to load the image in the load_template() function where we check only for lowercase extensions. BTW load_starter() has this problem too.

    Any hints there? We can add uppercase checks for each of extensions, duplicating the code, or we can list the directory containing the files and try to figure out the exact extension. Comments?

    As a (un)related thing, in both load_starter() and load_template() we don't check for SVGs in the first place, so if a file with a PNG extension is found first, it will be loaded (and maybe scaled) instead of the SVG one

     
  • Uppercase extension issue fixed in commit 1.856

     
  • Non-SVGs being incorrect preferred fixed in commit 1.857

     
    • status: open --> closed
    • Group: --> v0.9.22