1
Fork 0

Way too many changes

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
prescientmoon 2024-08-12 03:13:41 +02:00
parent 48c1f74f93
commit c035ecbb52
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
13 changed files with 348 additions and 157 deletions
src/arcaea

View file

@ -5,7 +5,7 @@ use num::Integer;
use crate::{
arcaea::chart::{Difficulty, Jacket, SongCache},
assets::{get_assets_dir, should_skip_jacket_art},
assets::{get_assets_dir, should_blur_jacket_art, should_skip_jacket_art},
context::Error,
recognition::fuzzy_song_name::guess_chart_name,
};
@ -149,12 +149,14 @@ impl JacketCache {
let image = image::load_from_memory(contents)?;
jacket_vectors.push((song_id, ImageVec::from_image(&image)));
let mut image =
image.resize(BITMAP_IMAGE_SIZE, BITMAP_IMAGE_SIZE, FilterType::Nearest);
let bitmap: &'static _ = Box::leak(Box::new(
image
.resize(BITMAP_IMAGE_SIZE, BITMAP_IMAGE_SIZE, FilterType::Nearest)
.into_rgb8(),
));
if should_blur_jacket_art() {
image = image.blur(20.0);
}
let bitmap: &'static _ = Box::leak(Box::new(image.into_rgb8()));
if name == "base" {
// Inefficiently iterates over everything, but it's fine for ~1k entries