From 3e472acfb8c2969316de102cd2ea3d3be00983c5 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 19 Oct 2026 10:56:05 +0800 Subject: [PATCH] fix: cleanup all external CC-BY-SA works for license compliance --- reference/bitmap assets/REUSE.toml | 8 ++--- src/bitmap/REUSE.toml | 30 ++++++++++------- .../std_icons/mimetype_icons.py | 32 +++++++++---------- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/reference/bitmap assets/REUSE.toml b/reference/bitmap assets/REUSE.toml index 7a14001..d72913f 100644 --- a/reference/bitmap assets/REUSE.toml +++ b/reference/bitmap assets/REUSE.toml @@ -1,8 +1,8 @@ version = 1 [[annotations]] -path = "Nycticorax_nycticorax12.jpg" +path = "Jokulsarlon_lake,_Iceland.jpg" precedence = "override" -SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Nycticorax_nycticorax12.jpg" -SPDX-FileCopyrightText = "Calibas" -SPDX-License-Identifier = "CC-BY-SA-3.0" +SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Jokulsarlon_lake,_Iceland.jpg" +SPDX-FileCopyrightText = "2006 Kenneth Muir" +SPDX-License-Identifier = "CC-BY-2.0" diff --git a/src/bitmap/REUSE.toml b/src/bitmap/REUSE.toml index cdfa35c..b404090 100644 --- a/src/bitmap/REUSE.toml +++ b/src/bitmap/REUSE.toml @@ -1,25 +1,31 @@ version = 1 [[annotations]] -path = "Niinsaare_järv.jpg" +path = "Herbert_Lake_beim_Icefields_Parkway.jpg" precedence = "override" -SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Niinsaare_j%C3%A4rv.jpg" -SPDX-FileCopyrightText = "2013 Ivar Leidus" -SPDX-License-Identifier = "CC-BY-SA-3.0" +SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Herbert_Lake_beim_Icefields_Parkway.jpg" +SPDX-FileCopyrightText = "2012 Florian Fuchs" +SPDX-License-Identifier = "CC-BY-3.0" [[annotations]] -path = "Tulipa_suaveolens_floriade_to_Canberra.jpg" +path = "Narzisse.jpg" precedence = "override" -SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Tulipa_suaveolens_floriade_to_Canberra.jpg" -SPDX-FileCopyrightText = "2005 John O'Neill" -SPDX-License-Identifier = "CC-BY-SA-3.0" +SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Narzisse.jpg" +SPDX-FileCopyrightText = "2008 Martin Hirtreiter" +SPDX-License-Identifier = "CC-BY-3.0" [[annotations]] -path = "Hot-air_balloon_in_Tambov_-_02.jpg" +path = "Narzisse-mask.png" precedence = "override" -SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Hot-air_balloon_in_Tambov_-_02.jpg" -SPDX-FileCopyrightText = "2022 Alexander Novikov" -SPDX-License-Identifier = "CC-BY-SA-4.0" +SPDX-FileCopyrightText = "2026 yyc12345" +SPDX-License-Identifier = "CC-BY-4.0" + +[[annotations]] +path = "Kite_(23729899095).jpg" +precedence = "override" +SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Kite_(23729899095).jpg" +SPDX-FileCopyrightText = "2015 Nebojsa Ljuboja" +SPDX-License-Identifier = "CC-BY-2.0" [[annotations]] path = "Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg" diff --git a/tool/src/aurora_iconset_builder/std_icons/mimetype_icons.py b/tool/src/aurora_iconset_builder/std_icons/mimetype_icons.py index e5768f8..c23e2d3 100644 --- a/tool/src/aurora_iconset_builder/std_icons/mimetype_icons.py +++ b/tool/src/aurora_iconset_builder/std_icons/mimetype_icons.py @@ -50,7 +50,7 @@ def register(ctx: AuroraContext) -> None: "std/mimetype/image-jpeg", ( TempArtSource("component", "image-base.png"), - BitmapSource("bitmap", "Niinsaare_järv.jpg"), + BitmapSource("bitmap", "Herbert_Lake_beim_Icefields_Parkway.jpg"), TempArtSink("image-jpeg.png"), FdArtSink(FdContext.MimeTypes, "image-jpeg"), IcoArtSink(IcoCategory.Extension, "jpg"), @@ -63,8 +63,8 @@ def register(ctx: AuroraContext) -> None: "std/mimetype/image-png", ( TempArtSource("component", "image-base.png"), - BitmapSource("bitmap", "Tulipa_suaveolens_floriade_to_Canberra.jpg"), - BitmapSource("bitmap", "Tulipa_suaveolens_floriade_to_Canberra-mask.png"), + BitmapSource("bitmap", "Narzisse.jpg"), + BitmapSource("bitmap", "Narzisse-mask.png"), SvgSource("image-png-checkerboard.svg"), FdArtSink(FdContext.MimeTypes, "image-png"), IcoArtSink(IcoCategory.Extension, "png"), @@ -89,7 +89,7 @@ def register(ctx: AuroraContext) -> None: "std/mimetype/image-gif", ( TempArtSource("component", "image-base.png"), - BitmapSource("bitmap", "Hot-air_balloon_in_Tambov_-_02.jpg"), + BitmapSource("bitmap", "Kite_(23729899095).jpg"), FdArtSink(FdContext.MimeTypes, "image-gif"), IcoArtSink(IcoCategory.Extension, "gif"), MsixArtSink(MsixCategory.Extension, "gif"), @@ -130,15 +130,8 @@ def build_image_jpeg_icon( jpg_image_inner = bitmap_src.pull(env) with jpg_image_inner: - # crop the area which is interested by ourselves - interest_area = Rectangle.from_pos_size_rect(Point(2700, 0), 5016, 3888) - crop_jpg_image_inner = jpg_image_inner.crop(interest_area.to_tuple()) - # do a flip - flip_jpg_image_inner = crop_jpg_image_inner.transpose( - PIL.Image.Transpose.FLIP_LEFT_RIGHT - ) # enhance its saturation - enhancer = PIL.ImageEnhance.Color(flip_jpg_image_inner) + enhancer = PIL.ImageEnhance.Color(jpg_image_inner) saturated_jpg_image_inner = enhancer.enhance(1.4) # fit to inner rect @@ -147,8 +140,9 @@ def build_image_jpeg_icon( IMAGE_INNER_RECT.width, IMAGE_INNER_RECT.height, PIL.Image.Resampling.NEAREST, - HorizontalAnchor.Center, - VerticalAnchor.Center, + # Left-top to keep more sky and more our interested area. + HorizontalAnchor.Left, + VerticalAnchor.Top, ) # paste into inner rect jpg_image.paste(bestfit_jpg_image_inner, IMAGE_INNER_RECT.to_tuple()) @@ -194,8 +188,8 @@ def build_image_png_icon( IMAGE_INNER_RECT.width, IMAGE_INNER_RECT.height, PIL.Image.Resampling.NEAREST, - HorizontalAnchor.Center, - VerticalAnchor.Top, + HorizontalAnchor.Left, + VerticalAnchor.Center, ) # TODO: When bestfit this checkerboard, the border of this checkerboard aer lost. # We may need resolve this in future but currently it is so subtle to notice. @@ -271,10 +265,14 @@ def build_image_gif_icon( gif_image_inner = bitmap_src.pull(env) with gif_image_inner: + # crop the area which is interested by ourselves + interest_area = Rectangle.from_pos_size_rect(Point(1600, 520), 2752, 1992) + crop_gif_image_inner = gif_image_inner.crop(interest_area.to_tuple()) + # we use the whole image as the inner, # so we directly fit it to inner. bestfit_inner = aspect_ratio_scale_and_crop( - gif_image_inner, + crop_gif_image_inner, IMAGE_INNER_RECT.width, IMAGE_INNER_RECT.height, PIL.Image.Resampling.NEAREST,