Josef Möllers GitHub пре 4 месеци
родитељ
комит
5f8f5dbf71
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 измењених фајлова са 8 додато и 2 уклоњено
  1. +8
    -2
      src/img2txt.c

+ 8
- 2
src/img2txt.c Прегледај датотеку

@@ -189,7 +189,13 @@ int main(int argc, char **argv)
} }


/* Assume a 6×10 font */ /* Assume a 6×10 font */
if(!cols && !lines)
if(!i->w || !i->h)
{
fprintf(stderr, "%s: image size is 0\n", argv[0]);
lines = 0;
cols = 0;
}
else if(!cols && !lines)
{ {
cols = 60; cols = 60;
lines = cols * i->h * font_width / i->w / font_height; lines = cols * i->h * font_width / i->w / font_height;
@@ -226,7 +232,7 @@ int main(int argc, char **argv)
export = caca_export_canvas_to_memory(cv, format, &len); export = caca_export_canvas_to_memory(cv, format, &len);
if(!export) if(!export)
{ {
fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format);
fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format?format:"ansi");
} }
else else
{ {


Loading…
Откажи
Сачувај