Files
immich-frame/src/immich_client.h
cottongin 1944ce4f93 fix: eliminate diagonal dither pattern from display driver
Root cause: Panel_ED2208's epd_quality mode applies _dither_row_rgb_pair
(diagonal bias pattern with dither=140) during _exec_transfer(). Since our
ImagePipeline already does proper Floyd-Steinberg dithering, the driver's
additional dithering was creating visible diagonal artifacts.

Fix: setEpdMode(epd_fastest) selects _dither_row_none (clean nearest-color
lookup, no spatial bias). On Panel_ED2208 this only affects the dither
function — NOT refresh quality or waveform.

Also: default dither_noise setting to OFF since error scatter was targeting
the wrong layer (it made gradient areas fuzzier without fixing the real
problem in the display driver).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 19:52:22 -04:00

51 lines
1.3 KiB
C++

#pragma once
#include <Arduino.h>
#include <vector>
#include "settings.h"
struct AlbumInfo {
String id;
String title;
int assetCount;
};
struct AssetInfo {
String id;
String originalFileName;
String dateTime;
String city;
String camera;
bool isFavorite;
bool isPortrait;
std::vector<String> people;
};
struct RandomAsset {
String id;
String dateTime;
};
class ImmichClient {
public:
void begin(const String& baseUrl, const String& apiKey);
std::vector<AlbumInfo> fetchAlbums();
std::vector<String> fetchAlbumAssetIds(const String& albumId);
std::vector<String> fetchRandomAssetIds(int count = 50);
std::vector<RandomAsset> fetchRandomAssets(int count = 50);
std::vector<String> fetchFavoriteAssetIds();
AssetInfo fetchAssetInfo(const String& assetId);
bool downloadAsset(const String& assetId, ImageQuality quality,
uint8_t** outBuffer, size_t* outSize);
private:
String _baseUrl;
String _apiKey;
String buildUrl(const String& path);
String httpGet(const String& url);
String httpPost(const String& url, const String& body);
char* httpGetPsram(const String& url, size_t* outLen);
bool httpGetBinary(const String& url, uint8_t** outBuffer, size_t* outSize);
};