sticker-convert 2.8.6__py3-none-any.whl → 2.8.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sticker_convert/converter.py +4 -4
- sticker_convert/gui_components/windows/advanced_compression_window.py +11 -2
- sticker_convert/resources/help.json +1 -1
- sticker_convert/resources/input.json +1 -1
- sticker_convert/utils/files/metadata_handler.py +1 -0
- sticker_convert/version.py +1 -1
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/METADATA +6 -4
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/RECORD +12 -12
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/LICENSE +0 -0
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/WHEEL +0 -0
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.8.6.dist-info → sticker_convert-2.8.7.dist-info}/top_level.txt +0 -0
sticker_convert/converter.py
CHANGED
@@ -186,8 +186,8 @@ class StickerConvert:
|
|
186
186
|
|
187
187
|
self.bg_color: Optional[Tuple[int, int, int, int]] = None
|
188
188
|
if self.opt_comp.bg_color:
|
189
|
-
r, g, b = bytes.fromhex(self.opt_comp.bg_color)
|
190
|
-
self.bg_color = (r, g, b,
|
189
|
+
r, g, b, a = bytes.fromhex(self.opt_comp.bg_color)
|
190
|
+
self.bg_color = (r, g, b, a)
|
191
191
|
|
192
192
|
self.tmp_f: BytesIO = BytesIO()
|
193
193
|
self.result: Optional[bytes] = None
|
@@ -228,7 +228,7 @@ class StickerConvert:
|
|
228
228
|
else:
|
229
229
|
self.size_max = self.opt_comp.size_max_img
|
230
230
|
|
231
|
-
if self.size_max
|
231
|
+
if self.size_max in (None, 0):
|
232
232
|
# No limit to size, create the best quality result
|
233
233
|
step_current = 0
|
234
234
|
else:
|
@@ -804,6 +804,7 @@ class StickerConvert:
|
|
804
804
|
# GIF can only have one alpha color
|
805
805
|
# Change lowest alpha to alpha=0
|
806
806
|
# Only keep alpha=0 and alpha=255, nothing in between
|
807
|
+
extra_kwargs["format"] = "GIF"
|
807
808
|
frames_processed = np.array(self.frames_processed)
|
808
809
|
alpha = frames_processed[:, :, :, 3]
|
809
810
|
alpha_min = np.min(alpha) # type: ignore
|
@@ -820,7 +821,6 @@ class StickerConvert:
|
|
820
821
|
self.quantize(Image.fromarray(i).convert("RGB")).convert("RGB") # type: ignore
|
821
822
|
for i in frames_processed
|
822
823
|
]
|
823
|
-
extra_kwargs["format"] = "GIF"
|
824
824
|
elif self.out_f.suffix == ".webp":
|
825
825
|
im_out = [Image.fromarray(i) for i in self.frames_processed] # type: ignore
|
826
826
|
extra_kwargs["format"] = "WebP"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
from __future__ import annotations
|
3
3
|
|
4
|
+
import re
|
4
5
|
from functools import partial
|
5
6
|
from tkinter import colorchooser
|
6
7
|
from typing import Any, List, Tuple
|
@@ -580,9 +581,17 @@ class AdvancedCompressionWindow(BaseWindow):
|
|
580
581
|
self.fake_vid_cbox.config(state=state)
|
581
582
|
|
582
583
|
def cb_bg_color(self, *_: Any) -> None:
|
583
|
-
|
584
|
+
color_init = "#" + self.gui.bg_color_var.get()[:6]
|
585
|
+
color_init = (
|
586
|
+
color_init if re.search(r"^#(?:[0-9a-fA-F]{3}){1,2}$", color_init) else None
|
587
|
+
)
|
588
|
+
color = colorchooser.askcolor(
|
589
|
+
title="Choose color",
|
590
|
+
color=color_init,
|
591
|
+
parent=self,
|
592
|
+
)[1]
|
584
593
|
if color:
|
585
|
-
self.gui.bg_color_var.set(color.replace("#", ""))
|
594
|
+
self.gui.bg_color_var.set(color.replace("#", "") + "00")
|
586
595
|
self.lift()
|
587
596
|
self.attributes("-topmost", True) # type: ignore
|
588
597
|
self.attributes("-topmost", False) # type: ignore
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"duration_min": "Set minimum output duration in miliseconds.",
|
41
41
|
"duration_max": "Set maximum output duration in miliseconds.",
|
42
42
|
"padding_percent": "Set percentage of space used as padding.",
|
43
|
-
"bg_color": "Set custom background color.\nExample:
|
43
|
+
"bg_color": "Set custom background color in rrggbbaa format.\nExample: 00ff0000 for green with alpha 0.\nIf this is not set, background color would be auto set to black if image is bright, or white if image is dark.\nNote: The color should not be visible if output format supports transparency.",
|
44
44
|
"size": "Set maximum file size in bytes for video and image.",
|
45
45
|
"vid_size_max": "Set maximum file size limit for animated stickers.",
|
46
46
|
"img_size_max": "Set maximum file size limit for static stickers.",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"auto": {
|
3
3
|
"full_name": "Download (Auto detect)",
|
4
4
|
"help": "Auto detect URL type and download",
|
5
|
-
"example": "Supported input sources: Signal, Telegram, Line, Kakao",
|
5
|
+
"example": "Supported input sources: Signal, Telegram, Line, Kakao, Viber",
|
6
6
|
"address_lbls": "URL address",
|
7
7
|
"metadata_provides": {
|
8
8
|
"title": false,
|
sticker_convert/version.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.8.
|
4
|
-
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
|
3
|
+
Version: 2.8.7
|
4
|
+
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
7
7
|
License: GNU GENERAL PUBLIC LICENSE
|
@@ -586,8 +586,8 @@ Compression options:
|
|
586
586
|
Set maximum output duration in miliseconds.
|
587
587
|
--padding-percent PADDING_PERCENT
|
588
588
|
Set percentage of space used as padding.
|
589
|
-
--bg-color BG_COLOR Set custom background color.
|
590
|
-
Example: 00ff00 for green.
|
589
|
+
--bg-color BG_COLOR Set custom background color in rrggbbaa format.
|
590
|
+
Example: 00ff00 for green with alpha 0.
|
591
591
|
If this is not set, background color would be auto set to black if image is bright, or white if image is dark.
|
592
592
|
Note: The color should not be visible if output format supports transparency.
|
593
593
|
--vid-size-max VID_SIZE_MAX
|
@@ -768,6 +768,7 @@ See [docs/COMPILING.md](docs/COMPILING.md)
|
|
768
768
|
- [WhatsApp](docs/guide_whatsapp.md)
|
769
769
|
- [Line](docs/guide_line.md)
|
770
770
|
- [Kakao](docs/guide_kakao.md)
|
771
|
+
- [Viber](docs/guide_viber.md)
|
771
772
|
- [iMessage](docs/guide_imessage.md)
|
772
773
|
|
773
774
|
### Conversion is slow
|
@@ -825,6 +826,7 @@ See [docs/TODO.md](docs/TODO.md)
|
|
825
826
|
- Information about Kakao animated stickers: https://gist.github.com/chitacan/9802668
|
826
827
|
- Downloading and decrypting Kakao animated stickers: https://github.com/blluv/KakaoTalkEmoticonDownloader
|
827
828
|
- Application icon taken from [Icons8](https://icons8.com/)
|
829
|
+
- Banner generated from [GitHub Socialify](https://socialify.git.ci/)
|
828
830
|
|
829
831
|
## DISCLAIMER
|
830
832
|
- The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao or Sticker Maker.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
sticker_convert/__init__.py,sha256=iQnv6UOOA69c3soAn7ZOnAIubTIQSUxtq1Uhh8xRWvU,102
|
2
2
|
sticker_convert/__main__.py,sha256=6RJauR-SCSSTT3TU7FFB6B6PVwsCxO2xZXtmZ3jc2Is,463
|
3
3
|
sticker_convert/cli.py,sha256=QGCpCSVt6ChVGXkX7Ngivl-CDUewqklqz2GRJKPFlsg,18621
|
4
|
-
sticker_convert/converter.py,sha256=
|
4
|
+
sticker_convert/converter.py,sha256=TtUPP_UcuRvdRSkf2YUR_uU-ZvLvJvZiRdNqcWb8R2I,37357
|
5
5
|
sticker_convert/definitions.py,sha256=ZhP2ALCEud-w9ZZD4c3TDG9eHGPZyaAL7zPUsJAbjtE,2073
|
6
6
|
sticker_convert/gui.py,sha256=TRPGwMhSMPHnZppHmw2OWHKTJtGoeLpGWD0eRYi4_yk,30707
|
7
7
|
sticker_convert/job.py,sha256=vKv1--y4MVmZV_IBpUhEfNEiUeEqrTR1umzlALPXKdw,25775
|
8
8
|
sticker_convert/job_option.py,sha256=JHAFCxp7-dDwD-1PbpYLAFRF3OoJu8cj_BjOm5r8Gp8,7732
|
9
|
-
sticker_convert/version.py,sha256=
|
9
|
+
sticker_convert/version.py,sha256=2rhNSmst8AP_X-CIWQr-qSqfOCpd7rtphVtzdfdbKwU,46
|
10
10
|
sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
sticker_convert/downloaders/download_base.py,sha256=rYoUijl_pKldzD8SJGFetDwgMWPSQSfQwzLDObEMGow,3980
|
12
12
|
sticker_convert/downloaders/download_kakao.py,sha256=UFp7EpMea62fIePY5DfhH4jThAwdeazfoC5iW1g4dAo,8516
|
@@ -26,7 +26,7 @@ sticker_convert/gui_components/frames/output_frame.py,sha256=n2WLk22h61DoZli8WbF
|
|
26
26
|
sticker_convert/gui_components/frames/progress_frame.py,sha256=LWUZg_iL7iiNTfu7N5Ct_pklZdghxihENi7DP9YozOE,4915
|
27
27
|
sticker_convert/gui_components/frames/right_clicker.py,sha256=dGIvSzEChrkguR80pzUemBNJ39uzJjVJQKeDNUoW3Gk,721
|
28
28
|
sticker_convert/gui_components/windows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
sticker_convert/gui_components/windows/advanced_compression_window.py,sha256=
|
29
|
+
sticker_convert/gui_components/windows/advanced_compression_window.py,sha256=DT5SgSWWKXRbOD8fJK-9kch9U_P1N3ox6-bphlPr0Ss,31964
|
30
30
|
sticker_convert/gui_components/windows/base_window.py,sha256=xBE1peGMPvWsdrFej0CJUVhmQ57GJGvz-cX03nIIhkE,1108
|
31
31
|
sticker_convert/gui_components/windows/kakao_get_auth_window.py,sha256=AvXB2Q8pAPkKILHTvlLGV9jfBcvskCA4arko4nvBTdo,7115
|
32
32
|
sticker_convert/gui_components/windows/line_get_auth_window.py,sha256=S4ES_lk2-GDvPokZtYALnUc5zW1VbS4WulNqO9K1aSs,3375
|
@@ -69,8 +69,8 @@ sticker_convert/resources/appicon.ico,sha256=-ldugcl2Yq2pBRTktnhGKWInpKyWzRjCiPv
|
|
69
69
|
sticker_convert/resources/appicon.png,sha256=6XBEQz7PnerqS43aRkwpWolFG4WvKMuQ-st1ly-_JPg,5265
|
70
70
|
sticker_convert/resources/compression.json,sha256=8SAv5m7_R2QFaU656W7gpliCJF9ZmGdE_XfnJU3D0ZE,12156
|
71
71
|
sticker_convert/resources/emoji.json,sha256=sXSuKusyG1L2Stuf9BL5ZqfzOIOdeAeE3RXcrXAsLdY,413367
|
72
|
-
sticker_convert/resources/help.json,sha256=
|
73
|
-
sticker_convert/resources/input.json,sha256=
|
72
|
+
sticker_convert/resources/help.json,sha256=YOemDoCtddz_7lrlkPnn5sa41kagmPkoFIC_OvYmSLI,6575
|
73
|
+
sticker_convert/resources/input.json,sha256=S3CkInBMLrk5OS9aJfuTCDsf_64NOjNT3IKQr7d1hM0,2665
|
74
74
|
sticker_convert/resources/output.json,sha256=QYP2gqDvEaAm5I9bH4NReaB1XMLboevv69u-V8YdZUs,1373
|
75
75
|
sticker_convert/uploaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
76
76
|
sticker_convert/uploaders/compress_wastickers.py,sha256=SMPf1_ir30ZKO2ChHspDFuyaufx0XeVBVLOlHmawEdY,6021
|
@@ -86,16 +86,16 @@ sticker_convert/utils/auth/get_signal_auth.py,sha256=6Sx-lMuyBHeX1RpjAWI8u03qnRu
|
|
86
86
|
sticker_convert/utils/files/cache_store.py,sha256=etfe614OAhAyrnM5fGeESKq6R88YLNqkqkxSzEmZ0V0,1047
|
87
87
|
sticker_convert/utils/files/json_manager.py,sha256=Vr6pZJdLMkrJJWN99210aduVHb0ILyf0SSTaw4TZqgc,541
|
88
88
|
sticker_convert/utils/files/json_resources_loader.py,sha256=flZFixUXRTrOAhvRQpuSQgmJ69yXL94sxukcowLT1JQ,1049
|
89
|
-
sticker_convert/utils/files/metadata_handler.py,sha256=
|
89
|
+
sticker_convert/utils/files/metadata_handler.py,sha256=UVKpwflsXwiVh-F-HNr0UcrixebfKQTU44iaPUhz-qw,10100
|
90
90
|
sticker_convert/utils/files/run_bin.py,sha256=QalA9je6liHxiOtxsjsFsIkc2t59quhcJCVpP1X3p50,1743
|
91
91
|
sticker_convert/utils/files/sanitize_filename.py,sha256=HBklPGsHRJjFQUIC5rYTQsUrsuTtezZXIEA8CPhLP8A,2156
|
92
92
|
sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE4l0MygBA1jB-PFiYLEkzk,3657
|
93
93
|
sticker_convert/utils/media/codec_info.py,sha256=SJSFvQzXHnGkj7MH9xJ5xiC4cqiOjFKckFKE_FICdT4,15562
|
94
94
|
sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
|
95
95
|
sticker_convert/utils/media/format_verify.py,sha256=Xf94jyqk_6M9IlFGMy0wYIgQKn_yg00nD4XW0CgAbew,5732
|
96
|
-
sticker_convert-2.8.
|
97
|
-
sticker_convert-2.8.
|
98
|
-
sticker_convert-2.8.
|
99
|
-
sticker_convert-2.8.
|
100
|
-
sticker_convert-2.8.
|
101
|
-
sticker_convert-2.8.
|
96
|
+
sticker_convert-2.8.7.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
97
|
+
sticker_convert-2.8.7.dist-info/METADATA,sha256=9fWyirZYvL67vRKVXNm-0kSrxQIscYBzal10dobfcy8,50061
|
98
|
+
sticker_convert-2.8.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
99
|
+
sticker_convert-2.8.7.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
100
|
+
sticker_convert-2.8.7.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
101
|
+
sticker_convert-2.8.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|