tinted-theming / tinty

A base16 and base24 color scheme manager
MIT License
42 stars 4 forks source link

[Bug report] generate-scheme is not working #58

Open windowsrefund opened 4 hours ago

windowsrefund commented 4 hours ago

What image format(s) are supported by the generate-scheme command?

I've tried with a .jpg and .png and am always given an error: Error: Invalid image file supplied

I really don't know anything about rust so ability to troubleshoot is limited. That said, here's a trace:

> RUST_BACKTRACE=full tinty generate-scheme --system base16 - upload/Insert.jpg                                                                                                             1 ↵
Error: Invalid image file supplied

Caused by:
    No such file or directory (os error 2)

Stack backtrace:
   0: anyhow::context::<impl anyhow::Context<T,E> for core::result::Result<T,E>>::with_context
   1: tinty::main
   2: std::sys::backtrace::__rust_begin_short_backtrace
   3: std::rt::lang_start::{{closure}}
   4: std::rt::lang_start_internal
   5: main
   6: __libc_start_call_main
             at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
   7: __libc_start_main_impl
             at ./csu/../csu/libc-start.c:360:3
   8: _start

and obviously....

> file upload/Insert.jpg
upload/Insert.jpg: JPEG image data, JFIF standard 1.01, resolution (DPI), density 300x300, segment length 16, progressive, precision 8, 1443x1431, components 3
JamyGolden commented 3 hours ago

There may still be a bug, but the immediate error I see is in the command: tinty generate-scheme --system base16 - upload/Insert.jpg.

It should be: tinty generate-scheme --system base16 upload/Insert.jpg without that - before the image path. I should update the error message to give back a nicer error message and include the path it was given which should help identify the issue.