sticker-convert 2.10.5__py3-none-any.whl → 2.10.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/frames/cred_frame.py +3 -1
- sticker_convert/job_option.py +0 -2
- sticker_convert/uploaders/compress_wastickers.py +0 -1
- sticker_convert/uploaders/upload_signal.py +0 -1
- sticker_convert/uploaders/upload_telegram.py +1 -2
- sticker_convert/uploaders/upload_viber.py +0 -1
- sticker_convert/uploaders/xcode_imessage.py +0 -1
- sticker_convert/utils/media/format_verify.py +23 -6
- sticker_convert/version.py +1 -1
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/METADATA +25 -25
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/RECORD +16 -16
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/WHEEL +1 -1
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/LICENSE +0 -0
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.10.5.dist-info → sticker_convert-2.10.7.dist-info}/top_level.txt +0 -0
sticker_convert/converter.py
CHANGED
@@ -535,7 +535,7 @@ class StickerConvert:
|
|
535
535
|
rgba_array = yuva_to_rgba(frame_resized)
|
536
536
|
|
537
537
|
# Remove pixels that was added to make dimensions even
|
538
|
-
rgba_array = rgba_array[0:
|
538
|
+
rgba_array = rgba_array[0:height_orig, 0:width_orig]
|
539
539
|
self.frames_raw.append(rgba_array)
|
540
540
|
|
541
541
|
def _frames_import_lottie(self) -> None:
|
@@ -622,12 +622,12 @@ class StickerConvert:
|
|
622
622
|
self.res_h = height
|
623
623
|
|
624
624
|
scaling = 1 - (self.opt_comp.padding_percent / 100)
|
625
|
-
if width > height:
|
625
|
+
if width / self.res_w > height / self.res_h:
|
626
626
|
width_new = int(self.res_w * scaling)
|
627
|
-
height_new = int(height * self.res_w
|
627
|
+
height_new = int(height * self.res_w / width * scaling)
|
628
628
|
else:
|
629
629
|
height_new = int(self.res_h * scaling)
|
630
|
-
width_new = int(width * self.res_h
|
630
|
+
width_new = int(width * self.res_h / height * scaling)
|
631
631
|
|
632
632
|
with im.resize((width_new, height_new), resample=resample) as im_resized:
|
633
633
|
with Image.new(
|
@@ -202,5 +202,7 @@ class CredFrame(LabelFrame):
|
|
202
202
|
self.kakao_get_auth_btn.config(state=state)
|
203
203
|
self.line_cookies_entry.config(state=state)
|
204
204
|
self.line_get_auth_btn.config(state=state)
|
205
|
-
self.viber_auth_lbl.config(state=state)
|
206
205
|
self.viber_auth_entry.config(state=state)
|
206
|
+
self.viber_get_auth_btn.config(state=state)
|
207
|
+
self.discord_token_entry.config(state=state)
|
208
|
+
self.discord_get_auth_btn.config(state=state)
|
sticker_convert/job_option.py
CHANGED
@@ -80,7 +80,6 @@ class CompOption(BaseOption):
|
|
80
80
|
no_compress: Optional[bool] = None
|
81
81
|
processes: int = ceil(cpu_count() / 2)
|
82
82
|
animated: Optional[bool] = None
|
83
|
-
square: Optional[bool] = None
|
84
83
|
|
85
84
|
def to_dict(self) -> Dict[Any, Any]:
|
86
85
|
return {
|
@@ -115,7 +114,6 @@ class CompOption(BaseOption):
|
|
115
114
|
"no_compress": self.no_compress,
|
116
115
|
"processes": self.processes,
|
117
116
|
"animated": self.animated,
|
118
|
-
"square": self.square,
|
119
117
|
}
|
120
118
|
|
121
119
|
def get_size_max(self) -> Tuple[Optional[int], Optional[int]]:
|
@@ -25,7 +25,6 @@ class UploadSignal(UploadBase):
|
|
25
25
|
self.base_spec.set_size_max(300000)
|
26
26
|
self.base_spec.set_res_max(512)
|
27
27
|
self.base_spec.duration_max = 3000
|
28
|
-
self.base_spec.square = True
|
29
28
|
|
30
29
|
self.png_spec = copy.deepcopy(self.base_spec)
|
31
30
|
self.png_spec.set_format((".apng",))
|
@@ -24,7 +24,6 @@ class UploadTelegram(UploadBase):
|
|
24
24
|
|
25
25
|
self.base_spec.size_max_img = 512000
|
26
26
|
self.base_spec.size_max_vid = 256000
|
27
|
-
self.base_spec.square = True
|
28
27
|
self.base_spec.duration_max = 3000
|
29
28
|
self.base_spec.set_res(512)
|
30
29
|
|
@@ -48,7 +47,7 @@ class UploadTelegram(UploadBase):
|
|
48
47
|
self.opt_comp_merged.merge(self.base_spec)
|
49
48
|
|
50
49
|
base_cover_spec = CompOption(
|
51
|
-
size_max_img=128000, size_max_vid=32000,
|
50
|
+
size_max_img=128000, size_max_vid=32000, duration_max=3000
|
52
51
|
)
|
53
52
|
base_cover_spec.set_res(100)
|
54
53
|
|
@@ -25,7 +25,6 @@ class XcodeImessage(UploadBase):
|
|
25
25
|
self.base_spec.set_size_max(500000)
|
26
26
|
self.base_spec.set_res(300)
|
27
27
|
self.base_spec.set_format(("png", ".apng", ".gif", ".jpeg", "jpg"))
|
28
|
-
self.base_spec.square = True
|
29
28
|
|
30
29
|
self.small_spec = copy.deepcopy(self.base_spec)
|
31
30
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
import os
|
3
|
+
from fractions import Fraction
|
3
4
|
from pathlib import Path
|
4
5
|
from typing import Optional, Tuple, Union
|
5
6
|
|
@@ -16,9 +17,7 @@ class FormatVerify:
|
|
16
17
|
file_info = CodecInfo(file)
|
17
18
|
|
18
19
|
return (
|
19
|
-
FormatVerify.check_file_res(
|
20
|
-
file, res=spec.get_res(), square=spec.square, file_info=file_info
|
21
|
-
)
|
20
|
+
FormatVerify.check_file_res(file, res=spec.get_res(), file_info=file_info)
|
22
21
|
and FormatVerify.check_file_fps(
|
23
22
|
file, fps=spec.get_fps(), file_info=file_info
|
24
23
|
)
|
@@ -48,7 +47,6 @@ class FormatVerify:
|
|
48
47
|
res: Tuple[
|
49
48
|
Tuple[Optional[int], Optional[int]], Tuple[Optional[int], Optional[int]]
|
50
49
|
],
|
51
|
-
square: Optional[bool] = None,
|
52
50
|
file_info: Optional[CodecInfo] = None,
|
53
51
|
) -> bool:
|
54
52
|
if file_info:
|
@@ -65,8 +63,27 @@ class FormatVerify:
|
|
65
63
|
return False
|
66
64
|
if res[1][1] and file_height > res[1][1]:
|
67
65
|
return False
|
68
|
-
|
69
|
-
|
66
|
+
|
67
|
+
min_ratio = None
|
68
|
+
if res[0][0] and res[1][0]:
|
69
|
+
min_ratio = Fraction(res[0][0], res[1][0])
|
70
|
+
|
71
|
+
max_ratio = None
|
72
|
+
if res[0][1] and res[1][1]:
|
73
|
+
max_ratio = Fraction(res[0][1], res[1][1])
|
74
|
+
|
75
|
+
file_ratio = Fraction(file_width, file_height)
|
76
|
+
|
77
|
+
if min_ratio is not None and max_ratio is not None:
|
78
|
+
if min_ratio == max_ratio:
|
79
|
+
return True if file_ratio == min_ratio else False
|
80
|
+
else:
|
81
|
+
return True
|
82
|
+
|
83
|
+
if min_ratio is not None:
|
84
|
+
return True if file_ratio == min_ratio else False
|
85
|
+
if max_ratio is not None:
|
86
|
+
return True if file_ratio == max_ratio else False
|
70
87
|
|
71
88
|
return True
|
72
89
|
|
sticker_convert/version.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.10.
|
3
|
+
Version: 2.10.7
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
7
|
-
License:
|
7
|
+
License: GNU GENERAL PUBLIC LICENSE
|
8
8
|
Version 2, June 1991
|
9
9
|
|
10
10
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
@@ -363,29 +363,29 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
363
363
|
Requires-Python: >=3.9
|
364
364
|
Description-Content-Type: text/markdown
|
365
365
|
License-File: LICENSE
|
366
|
-
Requires-Dist: aiolimiter
|
367
|
-
Requires-Dist: anyio
|
368
|
-
Requires-Dist:
|
369
|
-
Requires-Dist: av
|
370
|
-
Requires-Dist: beautifulsoup4
|
371
|
-
Requires-Dist: rookiepy
|
372
|
-
Requires-Dist: httpx
|
373
|
-
Requires-Dist: imagequant
|
374
|
-
Requires-Dist: memory-tempfile
|
375
|
-
Requires-Dist: mergedeep
|
376
|
-
Requires-Dist: mini-racer
|
377
|
-
Requires-Dist: numpy
|
378
|
-
Requires-Dist: Pillow
|
379
|
-
Requires-Dist: pyoxipng
|
380
|
-
Requires-Dist: python-telegram-bot
|
381
|
-
Requires-Dist: psutil
|
382
|
-
Requires-Dist: PyMemoryEditor
|
383
|
-
Requires-Dist: requests
|
384
|
-
Requires-Dist:
|
385
|
-
Requires-Dist: signalstickers-client-fork-laggykiller
|
386
|
-
Requires-Dist: tqdm
|
387
|
-
Requires-Dist: ttkbootstrap-fork-laggykiller
|
388
|
-
Requires-Dist:
|
366
|
+
Requires-Dist: aiolimiter~=1.1.0
|
367
|
+
Requires-Dist: anyio~=4.6.2.post1
|
368
|
+
Requires-Dist: apngasm_python~=1.3.1
|
369
|
+
Requires-Dist: av~=13.1.0
|
370
|
+
Requires-Dist: beautifulsoup4~=4.12.3
|
371
|
+
Requires-Dist: rookiepy~=0.5.6
|
372
|
+
Requires-Dist: httpx~=0.27.2
|
373
|
+
Requires-Dist: imagequant~=1.1.3
|
374
|
+
Requires-Dist: memory-tempfile~=2.2.3
|
375
|
+
Requires-Dist: mergedeep~=1.3.4
|
376
|
+
Requires-Dist: mini-racer~=0.12.4
|
377
|
+
Requires-Dist: numpy>=1.22.4
|
378
|
+
Requires-Dist: Pillow~=11.0.0
|
379
|
+
Requires-Dist: pyoxipng~=9.0.0
|
380
|
+
Requires-Dist: python-telegram-bot~=21.7
|
381
|
+
Requires-Dist: psutil~=6.1.0
|
382
|
+
Requires-Dist: PyMemoryEditor~=1.5.22
|
383
|
+
Requires-Dist: requests~=2.32.3
|
384
|
+
Requires-Dist: rlottie_python~=1.3.6
|
385
|
+
Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
|
386
|
+
Requires-Dist: tqdm~=4.67.1
|
387
|
+
Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
|
388
|
+
Requires-Dist: websocket_client~=1.8.0
|
389
389
|
|
390
390
|
# sticker-convert
|
391
391
|

|
@@ -1,12 +1,12 @@
|
|
1
1
|
sticker_convert/__init__.py,sha256=iQnv6UOOA69c3soAn7ZOnAIubTIQSUxtq1Uhh8xRWvU,102
|
2
2
|
sticker_convert/__main__.py,sha256=elDCMvU27letiYs8jPUpxaCq5puURnvcDuqGsAAb6_w,592
|
3
3
|
sticker_convert/cli.py,sha256=yI_56AfEi3Q2q8h1p8-l7wSK7wk3ktQNE_rwTAWwW1Q,20526
|
4
|
-
sticker_convert/converter.py,sha256=
|
4
|
+
sticker_convert/converter.py,sha256=gZIvF6WwYfnNyRkIjIR_VWphrBi5aU36f8uq8ouzVoE,35971
|
5
5
|
sticker_convert/definitions.py,sha256=ZhP2ALCEud-w9ZZD4c3TDG9eHGPZyaAL7zPUsJAbjtE,2073
|
6
6
|
sticker_convert/gui.py,sha256=IsVCXr5_6mzBgIgXtUICI3fcKu51J9WaLE9MBLrm5t4,33064
|
7
7
|
sticker_convert/job.py,sha256=ae0DKz74nctDLSI0VU7BYI4dx3kwTM8ynky_aLspQVU,26491
|
8
|
-
sticker_convert/job_option.py,sha256=
|
9
|
-
sticker_convert/version.py,sha256=
|
8
|
+
sticker_convert/job_option.py,sha256=HgoiZs9JBjki5_fjAp8l3y3kdAWvU7FEAgtPsy4MRt0,7818
|
9
|
+
sticker_convert/version.py,sha256=bYJEHSoUxGC_5BYlNNnbAGjQP4nl-tH0j9HcAjHIcLk,47
|
10
10
|
sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
sticker_convert/downloaders/download_base.py,sha256=a34JcNBgZ5yf6gZnxc-B5uNaKVUG-vs3sjOJnLneWsw,4468
|
12
12
|
sticker_convert/downloaders/download_discord.py,sha256=HeQFjJ7igb5KOk0aXQAUEuJ9OoPKyiE_mAD2_AW9PDw,3435
|
@@ -21,7 +21,7 @@ sticker_convert/gui_components/frames/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCe
|
|
21
21
|
sticker_convert/gui_components/frames/comp_frame.py,sha256=9k_UntKKi2G_g0byzoj1rdTqOq7q9mcnXiy799bYnr0,7257
|
22
22
|
sticker_convert/gui_components/frames/config_frame.py,sha256=b3X4QAnGpde0OhthXHmjSyU_Yb5tYRUFXmy04Yi8Zmo,4316
|
23
23
|
sticker_convert/gui_components/frames/control_frame.py,sha256=_XiOJ9JPUfiysDghGG04sEVLrXG9TMVlDZ60W0LhYVI,835
|
24
|
-
sticker_convert/gui_components/frames/cred_frame.py,sha256=
|
24
|
+
sticker_convert/gui_components/frames/cred_frame.py,sha256=cfNUuJKy1h0fprZwo7pbaTswTVKnJQFt9K5nexeZCRo,8603
|
25
25
|
sticker_convert/gui_components/frames/input_frame.py,sha256=5Vz1d6J1jkofvvzm43DxeIW_CjWfxa2QPYFnkAAiAfM,5040
|
26
26
|
sticker_convert/gui_components/frames/output_frame.py,sha256=n2WLk22h61DoZli8WbFhd-h2CqWAebDXnBa051JBuOc,4260
|
27
27
|
sticker_convert/gui_components/frames/progress_frame.py,sha256=LWUZg_iL7iiNTfu7N5Ct_pklZdghxihENi7DP9YozOE,4915
|
@@ -78,12 +78,12 @@ sticker_convert/resources/memdump_linux.sh,sha256=YbdX5C5RyCnoeDUE6JgTo8nQXKhrUw
|
|
78
78
|
sticker_convert/resources/memdump_windows.ps1,sha256=CfyNSSEW3HJOkTu-mKrP3qh5aprN-1VCBfj-R1fELA0,302
|
79
79
|
sticker_convert/resources/output.json,sha256=V4OseXEm3O16cAjHDVZRq8-SY-0_7cFFR_cyF-0Y_eQ,1570
|
80
80
|
sticker_convert/uploaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
81
|
-
sticker_convert/uploaders/compress_wastickers.py,sha256=
|
81
|
+
sticker_convert/uploaders/compress_wastickers.py,sha256=j5gLXwRHjEtmV2Kqv_-KkU8eeW6cZMo3hoSMvT4PKVk,5984
|
82
82
|
sticker_convert/uploaders/upload_base.py,sha256=uQupPn6r4zrlAzpKzzX7CgvZb69ATyrwPKahWOQj0ds,1203
|
83
|
-
sticker_convert/uploaders/upload_signal.py,sha256=
|
84
|
-
sticker_convert/uploaders/upload_telegram.py,sha256=
|
85
|
-
sticker_convert/uploaders/upload_viber.py,sha256=
|
86
|
-
sticker_convert/uploaders/xcode_imessage.py,sha256=
|
83
|
+
sticker_convert/uploaders/upload_signal.py,sha256=UuJdzwGAQsKhtj2Pkn4-jvak4Set0XI5XG1pEH2KDvI,6452
|
84
|
+
sticker_convert/uploaders/upload_telegram.py,sha256=7_hfPhnSNY40vC2DEhOI53_-U-D3ZiXv5casNVK69Mk,15708
|
85
|
+
sticker_convert/uploaders/upload_viber.py,sha256=fkAnsVyWc8vyK24--O4LyPgT-xvt-sAoBfeSWyUOeEg,6152
|
86
|
+
sticker_convert/uploaders/xcode_imessage.py,sha256=5UObj4DvfJ6yL1m71grQeZtqhl4BiZmoYwsVeCO_Rrc,11217
|
87
87
|
sticker_convert/utils/callback.py,sha256=spYUGlklOs1yPZAxoqwOWgR1sdimpfM8a27if3TaVYk,6155
|
88
88
|
sticker_convert/utils/chrome_remotedebug.py,sha256=tLc1C1u7U3kJvAi1WFK5_3gKcdfg4x6SAkTIX2g87VE,4765
|
89
89
|
sticker_convert/utils/emoji.py,sha256=AqB26JY-PkYzNwPLReSnqLiQKe-bR9UXnLclAbgubJ8,367
|
@@ -104,10 +104,10 @@ sticker_convert/utils/files/sanitize_filename.py,sha256=HBklPGsHRJjFQUIC5rYTQsUr
|
|
104
104
|
sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE4l0MygBA1jB-PFiYLEkzk,3657
|
105
105
|
sticker_convert/utils/media/codec_info.py,sha256=XoEWBfPWTzr4zSVQIU1XF1yh5viHxH5FytNEpdZR38c,14874
|
106
106
|
sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
|
107
|
-
sticker_convert/utils/media/format_verify.py,sha256=
|
108
|
-
sticker_convert-2.10.
|
109
|
-
sticker_convert-2.10.
|
110
|
-
sticker_convert-2.10.
|
111
|
-
sticker_convert-2.10.
|
112
|
-
sticker_convert-2.10.
|
113
|
-
sticker_convert-2.10.
|
107
|
+
sticker_convert/utils/media/format_verify.py,sha256=oM32P186tWe9YxvBQRPr8D3FEmBN3b2rEe_2S_MwxyQ,6236
|
108
|
+
sticker_convert-2.10.7.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
109
|
+
sticker_convert-2.10.7.dist-info/METADATA,sha256=0emOJ8oIvhGydLxuGL66DOk2MnUyxe8SdPm6RR-JbaM,52495
|
110
|
+
sticker_convert-2.10.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
111
|
+
sticker_convert-2.10.7.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
112
|
+
sticker_convert-2.10.7.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
113
|
+
sticker_convert-2.10.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|