fix: cleanup all external CC-BY-SA works for license compliance
This commit is contained in:
1 parent
2198eeee59
commit
3e472acfb8
3 files changed
+37
-33
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
version = 1
|
version = 1
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "Nycticorax_nycticorax12.jpg"
|
path = "Jokulsarlon_lake,_Iceland.jpg"
|
||||||
precedence = "override"
|
precedence = "override"
|
||||||
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Nycticorax_nycticorax12.jpg"
|
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Jokulsarlon_lake,_Iceland.jpg"
|
||||||
SPDX-FileCopyrightText = "Calibas"
|
SPDX-FileCopyrightText = "2006 Kenneth Muir"
|
||||||
SPDX-License-Identifier = "CC-BY-SA-3.0"
|
SPDX-License-Identifier = "CC-BY-2.0"
|
||||||
+18
-12
@@ -1,25 +1,31 @@
|
|||||||
version = 1
|
version = 1
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "Niinsaare_järv.jpg"
|
path = "Herbert_Lake_beim_Icefields_Parkway.jpg"
|
||||||
precedence = "override"
|
precedence = "override"
|
||||||
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Niinsaare_j%C3%A4rv.jpg"
|
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Herbert_Lake_beim_Icefields_Parkway.jpg"
|
||||||
SPDX-FileCopyrightText = "2013 Ivar Leidus"
|
SPDX-FileCopyrightText = "2012 Florian Fuchs"
|
||||||
SPDX-License-Identifier = "CC-BY-SA-3.0"
|
SPDX-License-Identifier = "CC-BY-3.0"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "Tulipa_suaveolens_floriade_to_Canberra.jpg"
|
path = "Narzisse.jpg"
|
||||||
precedence = "override"
|
precedence = "override"
|
||||||
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Tulipa_suaveolens_floriade_to_Canberra.jpg"
|
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Narzisse.jpg"
|
||||||
SPDX-FileCopyrightText = "2005 John O'Neill"
|
SPDX-FileCopyrightText = "2008 Martin Hirtreiter"
|
||||||
SPDX-License-Identifier = "CC-BY-SA-3.0"
|
SPDX-License-Identifier = "CC-BY-3.0"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "Hot-air_balloon_in_Tambov_-_02.jpg"
|
path = "Narzisse-mask.png"
|
||||||
precedence = "override"
|
precedence = "override"
|
||||||
SPDX-FileComment = "Source: https://commons.wikimedia.org/wiki/File:Hot-air_balloon_in_Tambov_-_02.jpg"
|
SPDX-FileCopyrightText = "2026 yyc12345"
|
||||||
SPDX-FileCopyrightText = "2022 Alexander Novikov"
|
SPDX-License-Identifier = "CC-BY-4.0"
|
||||||
SPDX-License-Identifier = "CC-BY-SA-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]]
|
[[annotations]]
|
||||||
path = "Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg"
|
path = "Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def register(ctx: AuroraContext) -> None:
|
|||||||
"std/mimetype/image-jpeg",
|
"std/mimetype/image-jpeg",
|
||||||
(
|
(
|
||||||
TempArtSource("component", "image-base.png"),
|
TempArtSource("component", "image-base.png"),
|
||||||
BitmapSource("bitmap", "Niinsaare_järv.jpg"),
|
BitmapSource("bitmap", "Herbert_Lake_beim_Icefields_Parkway.jpg"),
|
||||||
TempArtSink("image-jpeg.png"),
|
TempArtSink("image-jpeg.png"),
|
||||||
FdArtSink(FdContext.MimeTypes, "image-jpeg"),
|
FdArtSink(FdContext.MimeTypes, "image-jpeg"),
|
||||||
IcoArtSink(IcoCategory.Extension, "jpg"),
|
IcoArtSink(IcoCategory.Extension, "jpg"),
|
||||||
@@ -63,8 +63,8 @@ def register(ctx: AuroraContext) -> None:
|
|||||||
"std/mimetype/image-png",
|
"std/mimetype/image-png",
|
||||||
(
|
(
|
||||||
TempArtSource("component", "image-base.png"),
|
TempArtSource("component", "image-base.png"),
|
||||||
BitmapSource("bitmap", "Tulipa_suaveolens_floriade_to_Canberra.jpg"),
|
BitmapSource("bitmap", "Narzisse.jpg"),
|
||||||
BitmapSource("bitmap", "Tulipa_suaveolens_floriade_to_Canberra-mask.png"),
|
BitmapSource("bitmap", "Narzisse-mask.png"),
|
||||||
SvgSource("image-png-checkerboard.svg"),
|
SvgSource("image-png-checkerboard.svg"),
|
||||||
FdArtSink(FdContext.MimeTypes, "image-png"),
|
FdArtSink(FdContext.MimeTypes, "image-png"),
|
||||||
IcoArtSink(IcoCategory.Extension, "png"),
|
IcoArtSink(IcoCategory.Extension, "png"),
|
||||||
@@ -89,7 +89,7 @@ def register(ctx: AuroraContext) -> None:
|
|||||||
"std/mimetype/image-gif",
|
"std/mimetype/image-gif",
|
||||||
(
|
(
|
||||||
TempArtSource("component", "image-base.png"),
|
TempArtSource("component", "image-base.png"),
|
||||||
BitmapSource("bitmap", "Hot-air_balloon_in_Tambov_-_02.jpg"),
|
BitmapSource("bitmap", "Kite_(23729899095).jpg"),
|
||||||
FdArtSink(FdContext.MimeTypes, "image-gif"),
|
FdArtSink(FdContext.MimeTypes, "image-gif"),
|
||||||
IcoArtSink(IcoCategory.Extension, "gif"),
|
IcoArtSink(IcoCategory.Extension, "gif"),
|
||||||
MsixArtSink(MsixCategory.Extension, "gif"),
|
MsixArtSink(MsixCategory.Extension, "gif"),
|
||||||
@@ -130,15 +130,8 @@ def build_image_jpeg_icon(
|
|||||||
|
|
||||||
jpg_image_inner = bitmap_src.pull(env)
|
jpg_image_inner = bitmap_src.pull(env)
|
||||||
with jpg_image_inner:
|
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
|
# 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)
|
saturated_jpg_image_inner = enhancer.enhance(1.4)
|
||||||
|
|
||||||
# fit to inner rect
|
# fit to inner rect
|
||||||
@@ -147,8 +140,9 @@ def build_image_jpeg_icon(
|
|||||||
IMAGE_INNER_RECT.width,
|
IMAGE_INNER_RECT.width,
|
||||||
IMAGE_INNER_RECT.height,
|
IMAGE_INNER_RECT.height,
|
||||||
PIL.Image.Resampling.NEAREST,
|
PIL.Image.Resampling.NEAREST,
|
||||||
HorizontalAnchor.Center,
|
# Left-top to keep more sky and more our interested area.
|
||||||
VerticalAnchor.Center,
|
HorizontalAnchor.Left,
|
||||||
|
VerticalAnchor.Top,
|
||||||
)
|
)
|
||||||
# paste into inner rect
|
# paste into inner rect
|
||||||
jpg_image.paste(bestfit_jpg_image_inner, IMAGE_INNER_RECT.to_tuple())
|
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.width,
|
||||||
IMAGE_INNER_RECT.height,
|
IMAGE_INNER_RECT.height,
|
||||||
PIL.Image.Resampling.NEAREST,
|
PIL.Image.Resampling.NEAREST,
|
||||||
HorizontalAnchor.Center,
|
HorizontalAnchor.Left,
|
||||||
VerticalAnchor.Top,
|
VerticalAnchor.Center,
|
||||||
)
|
)
|
||||||
# TODO: When bestfit this checkerboard, the border of this checkerboard aer lost.
|
# 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.
|
# 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)
|
gif_image_inner = bitmap_src.pull(env)
|
||||||
with gif_image_inner:
|
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,
|
# we use the whole image as the inner,
|
||||||
# so we directly fit it to inner.
|
# so we directly fit it to inner.
|
||||||
bestfit_inner = aspect_ratio_scale_and_crop(
|
bestfit_inner = aspect_ratio_scale_and_crop(
|
||||||
gif_image_inner,
|
crop_gif_image_inner,
|
||||||
IMAGE_INNER_RECT.width,
|
IMAGE_INNER_RECT.width,
|
||||||
IMAGE_INNER_RECT.height,
|
IMAGE_INNER_RECT.height,
|
||||||
PIL.Image.Resampling.NEAREST,
|
PIL.Image.Resampling.NEAREST,
|
||||||
|
|||||||
Reference in new issue
Block a user