fix: detect the preview image format from its contents
This commit is contained in:
1 parent
3624873f55
commit
0186cb55eb
2 files changed
+24
-4
No files matched your search
+1
-3
@@ -341,9 +341,7 @@ fn handle(state: &mut State, id: u64, request: Request) -> Reply {
|
||||
}
|
||||
|
||||
fn add(state: &mut State, path: &Path, output_name: &str) -> Result<()> {
|
||||
let image = image::open(path)
|
||||
.with_context(|| format!("could not read {}", path.display()))?
|
||||
.to_rgba8();
|
||||
let image = crate::thumbnail::load(path)?;
|
||||
let outputs = state.output_list();
|
||||
let output = outputs
|
||||
.iter()
|
||||
|
||||
Reference in new issue
Block a user