mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(media-proxy): serve originals and speed up slow transforms (#3393)
This commit is contained in:
1 parent
44bc29b101
commit
aa3b058ce6
29 files changed
+632
-83
No files matched your search
@@ -69,6 +69,12 @@ pub(super) fn png_ihdr_dimensions(ihdr: &[u8]) -> Option<(u32, u32)> {
|
||||
))
|
||||
}
|
||||
|
||||
pub(super) fn png_zlib_level(bytes: &[u8]) -> Option<u8> {
|
||||
let chunks = parse_png_chunks(bytes).ok()?;
|
||||
let idat = chunks.iter().find(|chunk| chunk.kind == *b"IDAT")?;
|
||||
Some(idat.data.get(1)? >> 6)
|
||||
}
|
||||
|
||||
pub(super) fn test_media_limits() -> MediaLimits {
|
||||
MediaLimits::default_from_config()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user