diff --git a/src/assemblicon/lowlevel/artrdr.py b/src/assemblicon/lowlevel/artrdr.py index 0dfe6cb..d77160a 100644 --- a/src/assemblicon/lowlevel/artrdr.py +++ b/src/assemblicon/lowlevel/artrdr.py @@ -182,11 +182,11 @@ def render_thumbnail(art: Artifact, hws: Iterable[int]) -> Iterator[Artifact]: # check whether given artifact is square rectangle. if art.width != art.height: - raise ValueError(f'Thumbnail render only accept square rectangle.') - # scale artifact up to the maximum resolution hws if it is too small. + raise ValueError('Thumbnail render only accept square rectangle.') + # check whether given artifact is larger than the maximum resolution hws. max_hws = max(hws) if art.width < max_hws: - art = art.resize((max_hws, max_hws), PIL.Image.Resampling.LANCZOS) + raise ValueError('Given artifact is too small for rendering thumbnail.') # render thumbnail for hw in hws: