fix(art): preserve uncropped card art aspect ratio using fit=inside
All checks were successful
ESP32 Build & Release / build (push) Successful in 1m14s
All checks were successful
ESP32 Build & Release / build (push) Successful in 1m14s
This commit is contained in:
@@ -421,8 +421,8 @@ static esp_err_t scryfall_do_fetch(const char *card_name, const char *uid)
|
||||
char enc_img[512];
|
||||
url_encode(image_url, enc_img, sizeof(enc_img));
|
||||
char proxy_url[600];
|
||||
/* wsrv.nl converts Scryfall's progressive JPEG to a lightweight 200x110 baseline JPEG */
|
||||
snprintf(proxy_url, sizeof(proxy_url), "https://wsrv.nl/?url=%s&w=200&h=110&fit=cover&output=jpg", enc_img);
|
||||
/* wsrv.nl converts Scryfall's progressive JPEG to a lightweight baseline JPEG preserving original aspect ratio */
|
||||
snprintf(proxy_url, sizeof(proxy_url), "https://wsrv.nl/?url=%s&w=200&h=150&fit=inside&output=jpg", enc_img);
|
||||
esp_err_t dl = http_download_file(proxy_url, jpg_path);
|
||||
if (dl != ESP_OK) {
|
||||
ESP_LOGW(TAG, "proxied image download failed, trying direct: %s", image_url);
|
||||
|
||||
Reference in New Issue
Block a user