mirror of
https://github.com/immich-app/immich.git
synced 2025-12-29 01:11:52 +03:00
wip: panorama tiling
This commit is contained in:
@@ -2652,6 +2652,27 @@ export function viewAsset({ id, key, size, slug }: {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Get an image tile
|
||||
*/
|
||||
export function getAssetTile({ col, id, key, level, row, slug }: {
|
||||
col: number;
|
||||
id: string;
|
||||
key?: string;
|
||||
level: number;
|
||||
row: number;
|
||||
slug?: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/assets/${encodeURIComponent(id)}/tiles/${encodeURIComponent(level)}/${encodeURIComponent(col)}/${encodeURIComponent(row)}${QS.query(QS.explode({
|
||||
key,
|
||||
slug
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
/**
|
||||
* Play asset video
|
||||
*/
|
||||
|
||||
@@ -55,6 +55,13 @@ export const getAssetThumbnailPath = (id: string) => `/assets/${id}/thumbnail`;
|
||||
export const getAssetPlaybackPath = (id: string) =>
|
||||
`/assets/${id}/video/playback`;
|
||||
|
||||
export const getAssetTilePath = (
|
||||
id: string,
|
||||
level: number,
|
||||
col: number,
|
||||
row: number
|
||||
) => `/assets/${id}/tiles/${level}/${col}/${row}`;
|
||||
|
||||
export const getUserProfileImagePath = (userId: string) =>
|
||||
`/users/${userId}/profile-image`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user