]> git.draconx.ca Git - liblbx.git/blobdiff - src/lbximg.c
lbximg: Allow --identify as a long option.
[liblbx.git] / src / lbximg.c
index ada16929a32cf400797b089e849c4bdb371eabf0..0a0057a9fedf038846587c33a591bf8ba05f8853 100644 (file)
@@ -62,7 +62,9 @@ static const struct img_format {
        char name[4];
        bool enabled;
 } formats[] = {
+#if HAVE_LIBPNG
        { img_output_png, "png", 1 },
+#endif
        { img_output_pam, "pam", 1 },
        { img_output_ppm, "ppm", 1 },
        { img_output_pbm, "pbm", 1 },
@@ -330,13 +332,13 @@ int main(int argc, char **argv)
 
        static const char sopts[] = "idnvF:f:p:O:VH";
        static const struct option lopts[] = {
-               { "ident",      0, NULL, 'i' },
+               { "identify",   0, NULL, 'i' },
                { "decode",     0, NULL, 'd' },
                { "verbose",    0, NULL, 'v' },
                { "file",       1, NULL, 'f' },
                { "format",     1, NULL, 'F' },
                { "palette",    1, NULL, 'p' },
-               { "override",   1, NULL, 'p' },
+               { "override",   1, NULL, 'O' },
 
                { "version",    0, NULL, 'V' },
                { "usage",      0, NULL, 'U' },
@@ -431,6 +433,9 @@ int main(int argc, char **argv)
        }
 
        switch (mode) {
+       case MODE_IDENT:
+               rc = 0;
+               break;
        case MODE_DECODE:
                rc = decode(img, palf, overf, fmt, &argv[optind]);
                break;