sticker-convert 2.7.8__tar.gz → 2.7.10__tar.gz
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-2.7.8/src/sticker_convert.egg-info → sticker-convert-2.7.10}/PKG-INFO +20 -14
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/README.md +17 -12
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/requirements.txt +2 -1
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/cli.py +4 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/converter.py +78 -46
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui.py +12 -2
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/comp_frame.py +27 -67
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +83 -148
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/job.py +10 -6
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/job_option.py +4 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/compression.json +11 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/help.json +1 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/version.py +1 -1
- {sticker-convert-2.7.8 → sticker-convert-2.7.10/src/sticker_convert.egg-info}/PKG-INFO +20 -14
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert.egg-info/requires.txt +2 -1
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/LICENSE +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/MANIFEST.in +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/pyproject.toml +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/setup.cfg +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/__main__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/definitions.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/download_base.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/download_kakao.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/download_line.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/download_signal.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/downloaders/download_telegram.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/gui_utils.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/appicon.icns +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/appicon.ico +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/appicon.png +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/emoji.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/input.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/resources/output.json +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/__init__.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/upload_base.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/upload_signal.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/callback.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/cache_store.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/json_manager.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/run_bin.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/media/codec_info.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/media/format_verify.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert/utils/url_detect.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert.egg-info/entry_points.txt +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/src/sticker_convert.egg-info/top_level.txt +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/tests/test_compression.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/tests/test_download.py +0 -0
- {sticker-convert-2.7.8 → sticker-convert-2.7.10}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.10
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -372,12 +372,13 @@ Requires-Dist: beautifulsoup4~=4.12.3
|
|
372
372
|
Requires-Dist: rookiepy~=0.3.6
|
373
373
|
Requires-Dist: imagequant~=1.1.1
|
374
374
|
Requires-Dist: memory-tempfile~=2.2.3
|
375
|
+
Requires-Dist: mergedeep~=1.3.4
|
375
376
|
Requires-Dist: numpy>=1.22.4
|
376
377
|
Requires-Dist: Pillow==10.1.0
|
377
378
|
Requires-Dist: pyoxipng~=9.0.0
|
378
379
|
Requires-Dist: python-telegram-bot~=20.5
|
379
380
|
Requires-Dist: requests~=2.31.0
|
380
|
-
Requires-Dist: rlottie_python~=1.3.
|
381
|
+
Requires-Dist: rlottie_python~=1.3.4
|
381
382
|
Requires-Dist: signalstickers-client~=3.3.0
|
382
383
|
Requires-Dist: sqlcipher3-wheels~=0.5.2.post1
|
383
384
|
Requires-Dist: tqdm~=4.66.2
|
@@ -482,18 +483,19 @@ usage: sticker-convert.py [-h] [--version] [--no-confirm] [--input-dir INPUT_DIR
|
|
482
483
|
[--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}]
|
483
484
|
[--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX]
|
484
485
|
[--fps-power FPS_POWER] [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN]
|
485
|
-
[--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
|
486
|
+
[--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
|
486
487
|
[--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX] [--quality-power QUALITY_POWER]
|
487
488
|
[--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
|
488
|
-
[--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--
|
489
|
-
[--
|
490
|
-
[--
|
491
|
-
[--
|
492
|
-
[--signal-
|
489
|
+
[--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--bg-color BG_COLOR]
|
490
|
+
[--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
|
491
|
+
[--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER]
|
492
|
+
[--quantize-method QUANTIZE_METHOD] [--cache-dir CACHE_DIR] [--default-emoji DEFAULT_EMOJI]
|
493
|
+
[--signal-uuid SIGNAL_UUID] [--signal-password SIGNAL_PASSWORD] [--signal-get-auth]
|
494
|
+
[--signal-data-dir SIGNAL_DATA_DIR] [--telegram-token TELEGRAM_TOKEN]
|
493
495
|
[--telegram-userid TELEGRAM_USERID] [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth]
|
494
496
|
[--kakao-username KAKAO_USERNAME] [--kakao-password KAKAO_PASSWORD]
|
495
|
-
[--kakao-country-code KAKAO_COUNTRY_CODE] [--kakao-phone-number KAKAO_PHONE_NUMBER]
|
496
|
-
[--line-
|
497
|
+
[--kakao-country-code KAKAO_COUNTRY_CODE] [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth]
|
498
|
+
[--line-cookies LINE_COOKIES] [--save-cred SAVE_CRED]
|
497
499
|
|
498
500
|
CLI for stickers-convert
|
499
501
|
|
@@ -538,7 +540,7 @@ Output options:
|
|
538
540
|
|
539
541
|
Compression options:
|
540
542
|
--no-compress Do not compress files. Useful for only downloading stickers.
|
541
|
-
--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}
|
543
|
+
--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}
|
542
544
|
Apply preset for compression.
|
543
545
|
--steps STEPS Set number of divisions between min and max settings.
|
544
546
|
Steps higher = Slower but yields file more closer to the specified file size limit.
|
@@ -579,6 +581,10 @@ Compression options:
|
|
579
581
|
Set minimum output duration in miliseconds.
|
580
582
|
--duration-max DURATION_MAX
|
581
583
|
Set maximum output duration in miliseconds.
|
584
|
+
--bg-color BG_COLOR Set custom background color.
|
585
|
+
Example: 00ff00 for green.
|
586
|
+
If this is not set, background color would be auto set to black if image is bright, or white if image is dark.
|
587
|
+
Note: The color should not be visible if output format supports transparency.
|
582
588
|
--vid-size-max VID_SIZE_MAX
|
583
589
|
Set maximum file size limit for animated stickers.
|
584
590
|
--img-size-max IMG_SIZE_MAX
|
@@ -622,10 +628,10 @@ Credentials options:
|
|
622
628
|
--telegram-token TELEGRAM_TOKEN
|
623
629
|
Set Telegram token. Required for uploading and downloading Telegram stickers.
|
624
630
|
--telegram-userid TELEGRAM_USERID
|
625
|
-
Set telegram user_id (From real account, not bot account). Required for uploading Telegram stickers.
|
631
|
+
Set telegram user_id (From real account, not bot account). Required for uploading Telegram stickers.
|
626
632
|
--kakao-auth-token KAKAO_AUTH_TOKEN
|
627
|
-
Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx
|
628
|
-
--kakao-get-auth Generate Kakao auth_token. Kakao username, password, country code and phone number are also required.
|
633
|
+
Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx
|
634
|
+
--kakao-get-auth Generate Kakao auth_token. Kakao username, password, country code and phone number are also required.
|
629
635
|
--kakao-username KAKAO_USERNAME
|
630
636
|
Set Kakao username, which is email or phone number used for signing up Kakao account
|
631
637
|
Example: +447700900142
|
@@ -96,18 +96,19 @@ usage: sticker-convert.py [-h] [--version] [--no-confirm] [--input-dir INPUT_DIR
|
|
96
96
|
[--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}]
|
97
97
|
[--steps STEPS] [--processes PROCESSES] [--fps-min FPS_MIN] [--fps-max FPS_MAX]
|
98
98
|
[--fps-power FPS_POWER] [--res-min RES_MIN] [--res-max RES_MAX] [--res-w-min RES_W_MIN]
|
99
|
-
[--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
|
99
|
+
[--res-w-max RES_W_MAX] [--res-h-min RES_H_MIN] [--res-h-max RES_H_MAX] [--res-power RES_POWER]
|
100
100
|
[--quality-min QUALITY_MIN] [--quality-max QUALITY_MAX] [--quality-power QUALITY_POWER]
|
101
101
|
[--color-min COLOR_MIN] [--color-max COLOR_MAX] [--color-power COLOR_POWER]
|
102
|
-
[--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--
|
103
|
-
[--
|
104
|
-
[--
|
105
|
-
[--
|
106
|
-
[--signal-
|
102
|
+
[--duration-min DURATION_MIN] [--duration-max DURATION_MAX] [--bg-color BG_COLOR]
|
103
|
+
[--vid-size-max VID_SIZE_MAX] [--img-size-max IMG_SIZE_MAX] [--vid-format VID_FORMAT]
|
104
|
+
[--img-format IMG_FORMAT] [--fake-vid] [--scale-filter SCALE_FILTER]
|
105
|
+
[--quantize-method QUANTIZE_METHOD] [--cache-dir CACHE_DIR] [--default-emoji DEFAULT_EMOJI]
|
106
|
+
[--signal-uuid SIGNAL_UUID] [--signal-password SIGNAL_PASSWORD] [--signal-get-auth]
|
107
|
+
[--signal-data-dir SIGNAL_DATA_DIR] [--telegram-token TELEGRAM_TOKEN]
|
107
108
|
[--telegram-userid TELEGRAM_USERID] [--kakao-auth-token KAKAO_AUTH_TOKEN] [--kakao-get-auth]
|
108
109
|
[--kakao-username KAKAO_USERNAME] [--kakao-password KAKAO_PASSWORD]
|
109
|
-
[--kakao-country-code KAKAO_COUNTRY_CODE] [--kakao-phone-number KAKAO_PHONE_NUMBER]
|
110
|
-
[--line-
|
110
|
+
[--kakao-country-code KAKAO_COUNTRY_CODE] [--kakao-phone-number KAKAO_PHONE_NUMBER] [--line-get-auth]
|
111
|
+
[--line-cookies LINE_COOKIES] [--save-cred SAVE_CRED]
|
111
112
|
|
112
113
|
CLI for stickers-convert
|
113
114
|
|
@@ -152,7 +153,7 @@ Output options:
|
|
152
153
|
|
153
154
|
Compression options:
|
154
155
|
--no-compress Do not compress files. Useful for only downloading stickers.
|
155
|
-
--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}
|
156
|
+
--preset {auto,signal,telegram,telegram_emoji,whatsapp,line,kakao,imessage_small,imessage_medium,imessage_large,custom}
|
156
157
|
Apply preset for compression.
|
157
158
|
--steps STEPS Set number of divisions between min and max settings.
|
158
159
|
Steps higher = Slower but yields file more closer to the specified file size limit.
|
@@ -193,6 +194,10 @@ Compression options:
|
|
193
194
|
Set minimum output duration in miliseconds.
|
194
195
|
--duration-max DURATION_MAX
|
195
196
|
Set maximum output duration in miliseconds.
|
197
|
+
--bg-color BG_COLOR Set custom background color.
|
198
|
+
Example: 00ff00 for green.
|
199
|
+
If this is not set, background color would be auto set to black if image is bright, or white if image is dark.
|
200
|
+
Note: The color should not be visible if output format supports transparency.
|
196
201
|
--vid-size-max VID_SIZE_MAX
|
197
202
|
Set maximum file size limit for animated stickers.
|
198
203
|
--img-size-max IMG_SIZE_MAX
|
@@ -236,10 +241,10 @@ Credentials options:
|
|
236
241
|
--telegram-token TELEGRAM_TOKEN
|
237
242
|
Set Telegram token. Required for uploading and downloading Telegram stickers.
|
238
243
|
--telegram-userid TELEGRAM_USERID
|
239
|
-
Set telegram user_id (From real account, not bot account). Required for uploading Telegram stickers.
|
244
|
+
Set telegram user_id (From real account, not bot account). Required for uploading Telegram stickers.
|
240
245
|
--kakao-auth-token KAKAO_AUTH_TOKEN
|
241
|
-
Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx
|
242
|
-
--kakao-get-auth Generate Kakao auth_token. Kakao username, password, country code and phone number are also required.
|
246
|
+
Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx
|
247
|
+
--kakao-get-auth Generate Kakao auth_token. Kakao username, password, country code and phone number are also required.
|
243
248
|
--kakao-username KAKAO_USERNAME
|
244
249
|
Set Kakao username, which is email or phone number used for signing up Kakao account
|
245
250
|
Example: +447700900142
|
@@ -6,12 +6,13 @@ beautifulsoup4~=4.12.3
|
|
6
6
|
rookiepy~=0.3.6
|
7
7
|
imagequant~=1.1.1
|
8
8
|
memory-tempfile~=2.2.3
|
9
|
+
mergedeep~=1.3.4
|
9
10
|
numpy>=1.22.4
|
10
11
|
Pillow==10.1.0
|
11
12
|
pyoxipng~=9.0.0
|
12
13
|
python-telegram-bot~=20.5
|
13
14
|
requests~=2.31.0
|
14
|
-
rlottie_python~=1.3.
|
15
|
+
rlottie_python~=1.3.4
|
15
16
|
signalstickers-client~=3.3.0
|
16
17
|
sqlcipher3-wheels~=0.5.2.post1
|
17
18
|
tqdm~=4.66.2
|
@@ -114,6 +114,7 @@ class CLI:
|
|
114
114
|
)
|
115
115
|
flags_comp_float = ("fps_power", "res_power", "quality_power", "color_power")
|
116
116
|
flags_comp_str = (
|
117
|
+
"bg_color",
|
117
118
|
"vid_format",
|
118
119
|
"img_format",
|
119
120
|
"cache_dir",
|
@@ -350,6 +351,9 @@ class CLI:
|
|
350
351
|
duration_max=self.compression_presets[preset]["duration"]["max"]
|
351
352
|
if args.duration_max is None
|
352
353
|
else args.duration_max,
|
354
|
+
bg_color=self.compression_presets[preset]["bg_color"]
|
355
|
+
if args.bg_color is None
|
356
|
+
else args.bg_color,
|
353
357
|
steps=self.compression_presets[preset]["steps"]
|
354
358
|
if args.steps is None
|
355
359
|
else args.steps,
|
@@ -19,6 +19,7 @@ from sticker_convert.utils.media.codec_info import CodecInfo
|
|
19
19
|
from sticker_convert.utils.media.format_verify import FormatVerify
|
20
20
|
|
21
21
|
if TYPE_CHECKING:
|
22
|
+
from av.video.frame import VideoFrame # type: ignore
|
22
23
|
from av.video.plane import VideoPlane # type: ignore
|
23
24
|
|
24
25
|
MSG_START_COMP = "[I] Start compressing {} -> {}"
|
@@ -34,6 +35,14 @@ MSG_FAIL_COMP = (
|
|
34
35
|
"cannot get below limit {} with lowest quality under current settings (Best size: {})"
|
35
36
|
)
|
36
37
|
|
38
|
+
YUV_RGB_MATRIX = np.array(
|
39
|
+
[
|
40
|
+
[1.164, 0.000, 1.793],
|
41
|
+
[1.164, -0.213, -0.533],
|
42
|
+
[1.164, 2.112, 0.000],
|
43
|
+
]
|
44
|
+
)
|
45
|
+
|
37
46
|
|
38
47
|
def rounding(value: float) -> Decimal:
|
39
48
|
return Decimal(value).quantize(0, ROUND_HALF_UP)
|
@@ -76,6 +85,40 @@ def useful_array(
|
|
76
85
|
return arr.view(np.dtype(dtype))
|
77
86
|
|
78
87
|
|
88
|
+
def yuva_to_rgba(frame: "VideoFrame") -> "np.ndarray[Any, Any]":
|
89
|
+
# https://stackoverflow.com/questions/72308308/converting-yuv-to-rgb-in-python-coefficients-work-with-array-dont-work-with-n
|
90
|
+
|
91
|
+
width = frame.width
|
92
|
+
height = frame.height
|
93
|
+
|
94
|
+
y = useful_array(frame.planes[0]).reshape(height, width)
|
95
|
+
u = useful_array(frame.planes[1]).reshape(height // 2, width // 2)
|
96
|
+
v = useful_array(frame.planes[2]).reshape(height // 2, width // 2)
|
97
|
+
a = useful_array(frame.planes[3]).reshape(height, width)
|
98
|
+
|
99
|
+
u = u.repeat(2, axis=0).repeat(2, axis=1)
|
100
|
+
v = v.repeat(2, axis=0).repeat(2, axis=1)
|
101
|
+
|
102
|
+
y = y.reshape((y.shape[0], y.shape[1], 1))
|
103
|
+
u = u.reshape((u.shape[0], u.shape[1], 1))
|
104
|
+
v = v.reshape((v.shape[0], v.shape[1], 1))
|
105
|
+
a = a.reshape((a.shape[0], a.shape[1], 1))
|
106
|
+
|
107
|
+
yuv_array = np.concatenate((y, u, v), axis=2)
|
108
|
+
|
109
|
+
yuv_array = yuv_array.astype(np.float32)
|
110
|
+
yuv_array[:, :, 0] = (
|
111
|
+
yuv_array[:, :, 0].clip(16, 235).astype(yuv_array.dtype) - 16 # type: ignore
|
112
|
+
)
|
113
|
+
yuv_array[:, :, 1:] = (
|
114
|
+
yuv_array[:, :, 1:].clip(16, 240).astype(yuv_array.dtype) - 128 # type: ignore
|
115
|
+
)
|
116
|
+
|
117
|
+
rgb_array = np.matmul(yuv_array, YUV_RGB_MATRIX.T).clip(0, 255).astype("uint8")
|
118
|
+
|
119
|
+
return np.concatenate((rgb_array, a), axis=2)
|
120
|
+
|
121
|
+
|
79
122
|
class StickerConvert:
|
80
123
|
def __init__(
|
81
124
|
self,
|
@@ -131,6 +174,11 @@ class StickerConvert:
|
|
131
174
|
self.fps: Optional[Fraction] = None
|
132
175
|
self.color: Optional[int] = None
|
133
176
|
|
177
|
+
self.bg_color: Optional[Tuple[int, int, int, int]] = None
|
178
|
+
if self.opt_comp.bg_color:
|
179
|
+
r, g, b = bytes.fromhex(self.opt_comp.bg_color)
|
180
|
+
self.bg_color = (r, g, b, 0)
|
181
|
+
|
134
182
|
self.tmp_f: BytesIO = BytesIO()
|
135
183
|
self.result: Optional[bytes] = None
|
136
184
|
self.result_size: int = 0
|
@@ -407,10 +455,12 @@ class StickerConvert:
|
|
407
455
|
width = frame.width - 1
|
408
456
|
else:
|
409
457
|
width = frame.width
|
458
|
+
|
410
459
|
if frame.height % 2 != 0:
|
411
460
|
height = frame.height - 1
|
412
461
|
else:
|
413
462
|
height = frame.height
|
463
|
+
|
414
464
|
if frame.format.name == "yuv420p":
|
415
465
|
rgb_array = frame.to_ndarray(format="rgb24")
|
416
466
|
cast("np.ndarray[Any, Any]", rgb_array)
|
@@ -422,6 +472,7 @@ class StickerConvert:
|
|
422
472
|
)
|
423
473
|
else:
|
424
474
|
# yuva420p may cause crash
|
475
|
+
# Not safe to directly call frame.to_ndarray(format="rgba")
|
425
476
|
# https://github.com/laggykiller/sticker-convert/issues/114
|
426
477
|
frame = frame.reformat(
|
427
478
|
width=width,
|
@@ -429,50 +480,7 @@ class StickerConvert:
|
|
429
480
|
format="yuva420p",
|
430
481
|
dst_colorspace=1,
|
431
482
|
)
|
432
|
-
|
433
|
-
# https://stackoverflow.com/questions/72308308/converting-yuv-to-rgb-in-python-coefficients-work-with-array-dont-work-with-n
|
434
|
-
y = useful_array(frame.planes[0]).reshape(height, width)
|
435
|
-
u = useful_array(frame.planes[1]).reshape(
|
436
|
-
height // 2,
|
437
|
-
width // 2,
|
438
|
-
)
|
439
|
-
v = useful_array(frame.planes[2]).reshape(
|
440
|
-
height // 2,
|
441
|
-
width // 2,
|
442
|
-
)
|
443
|
-
a = useful_array(frame.planes[3]).reshape(height, width)
|
444
|
-
|
445
|
-
u = u.repeat(2, axis=0).repeat(2, axis=1)
|
446
|
-
v = v.repeat(2, axis=0).repeat(2, axis=1)
|
447
|
-
|
448
|
-
y = y.reshape((y.shape[0], y.shape[1], 1))
|
449
|
-
u = u.reshape((u.shape[0], u.shape[1], 1))
|
450
|
-
v = v.reshape((v.shape[0], v.shape[1], 1))
|
451
|
-
a = a.reshape((a.shape[0], a.shape[1], 1))
|
452
|
-
|
453
|
-
yuv_array = np.concatenate((y, u, v), axis=2)
|
454
|
-
|
455
|
-
yuv_array = yuv_array.astype(np.float32)
|
456
|
-
yuv_array[:, :, 0] = (
|
457
|
-
yuv_array[:, :, 0].clip(16, 235).astype(yuv_array.dtype) # type: ignore
|
458
|
-
- 16
|
459
|
-
)
|
460
|
-
yuv_array[:, :, 1:] = (
|
461
|
-
yuv_array[:, :, 1:].clip(16, 240).astype(yuv_array.dtype) # type: ignore
|
462
|
-
- 128
|
463
|
-
)
|
464
|
-
|
465
|
-
convert = np.array(
|
466
|
-
[
|
467
|
-
[1.164, 0.000, 1.793],
|
468
|
-
[1.164, -0.213, -0.533],
|
469
|
-
[1.164, 2.112, 0.000],
|
470
|
-
]
|
471
|
-
)
|
472
|
-
rgb_array = (
|
473
|
-
np.matmul(yuv_array, convert.T).clip(0, 255).astype("uint8")
|
474
|
-
)
|
475
|
-
rgba_array = np.concatenate((rgb_array, a), axis=2)
|
483
|
+
rgba_array = yuva_to_rgba(frame)
|
476
484
|
|
477
485
|
self.frames_raw.append(rgba_array)
|
478
486
|
|
@@ -505,6 +513,27 @@ class StickerConvert:
|
|
505
513
|
|
506
514
|
anim.lottie_animation_destroy()
|
507
515
|
|
516
|
+
def determine_bg_color(self) -> Tuple[int, int, int, int]:
|
517
|
+
# Calculate average color of all frames for selecting background color
|
518
|
+
frames_raw_np = np.array(self.frames_raw)
|
519
|
+
s = frames_raw_np.shape
|
520
|
+
colors = frames_raw_np.reshape((-1, s[3])) # type: ignore
|
521
|
+
# Do not count in alpha=0
|
522
|
+
# If alpha > 0, use alpha as weight
|
523
|
+
colors = colors[colors[:, 3] != 0]
|
524
|
+
if colors.shape[0] == 0:
|
525
|
+
return (0, 0, 0, 0)
|
526
|
+
else:
|
527
|
+
alphas = colors[:, 3] / 255
|
528
|
+
r_mean = np.mean(colors[:, 0] * alphas)
|
529
|
+
g_mean = np.mean(colors[:, 1] * alphas)
|
530
|
+
b_mean = np.mean(colors[:, 2] * alphas)
|
531
|
+
mean = (r_mean + g_mean + b_mean) / 3
|
532
|
+
if mean < 128:
|
533
|
+
return (255, 255, 255, 0)
|
534
|
+
else:
|
535
|
+
return (0, 0, 0, 0)
|
536
|
+
|
508
537
|
def frames_resize(
|
509
538
|
self, frames_in: "List[np.ndarray[Any, Any]]"
|
510
539
|
) -> "List[np.ndarray[Any, Any]]":
|
@@ -526,6 +555,9 @@ class StickerConvert:
|
|
526
555
|
else:
|
527
556
|
resample = Image.BICUBIC
|
528
557
|
|
558
|
+
if self.bg_color is None:
|
559
|
+
self.bg_color = self.determine_bg_color()
|
560
|
+
|
529
561
|
for frame in frames_in:
|
530
562
|
with Image.fromarray(frame, "RGBA") as im: # type: ignore
|
531
563
|
width, height = im.size
|
@@ -544,9 +576,9 @@ class StickerConvert:
|
|
544
576
|
|
545
577
|
with im.resize((width_new, height_new), resample=resample) as im_resized:
|
546
578
|
with Image.new(
|
547
|
-
"RGBA", (self.res_w, self.res_h),
|
579
|
+
"RGBA", (self.res_w, self.res_h), self.bg_color
|
548
580
|
) as im_new:
|
549
|
-
im_new.
|
581
|
+
im_new.alpha_composite(
|
550
582
|
im_resized,
|
551
583
|
((self.res_w - width_new) // 2, (self.res_h - height_new) // 2),
|
552
584
|
)
|
@@ -12,6 +12,7 @@ from threading import Thread
|
|
12
12
|
from typing import Any, Callable, Dict, Optional, Union
|
13
13
|
from urllib.parse import urlparse
|
14
14
|
|
15
|
+
from mergedeep import merge # type: ignore
|
15
16
|
from PIL import ImageFont
|
16
17
|
from ttkbootstrap import BooleanVar, DoubleVar, IntVar, StringVar, Toplevel, Window # type: ignore
|
17
18
|
from ttkbootstrap.dialogs import Messagebox, Querybox # type: ignore
|
@@ -127,6 +128,7 @@ class GUI(Window):
|
|
127
128
|
self.img_size_max_var = IntVar(self)
|
128
129
|
self.vid_size_max_var = IntVar(self)
|
129
130
|
self.size_disable_var = BooleanVar()
|
131
|
+
self.bg_color_var = StringVar()
|
130
132
|
self.img_format_var = StringVar(self)
|
131
133
|
self.vid_format_var = StringVar(self)
|
132
134
|
self.fake_vid_var = BooleanVar()
|
@@ -265,7 +267,12 @@ class GUI(Window):
|
|
265
267
|
def save_config(self) -> None:
|
266
268
|
# Only update comp_custom if custom preset is selected
|
267
269
|
if self.comp_preset_var.get() == "custom":
|
268
|
-
comp_custom =
|
270
|
+
comp_custom: Dict[Any, Any] = merge( # type: ignore
|
271
|
+
self.compression_presets.get("custom"), # type: ignore
|
272
|
+
self.get_opt_comp().to_dict(),
|
273
|
+
)
|
274
|
+
comp_custom["format"]["img"] = comp_custom["format"]["img"][0]
|
275
|
+
comp_custom["format"]["vid"] = comp_custom["format"]["vid"][0]
|
269
276
|
del comp_custom["preset"]
|
270
277
|
del comp_custom["no_compress"]
|
271
278
|
else:
|
@@ -332,7 +339,9 @@ class GUI(Window):
|
|
332
339
|
)
|
333
340
|
comp_custom = self.settings.get("comp_custom")
|
334
341
|
if comp_custom:
|
335
|
-
self.compression_presets["custom"] =
|
342
|
+
self.compression_presets["custom"] = merge(
|
343
|
+
self.compression_presets["custom"], comp_custom
|
344
|
+
)
|
336
345
|
self.cache_dir_var.set(self.settings.get("comp", {}).get("cache_dir", ""))
|
337
346
|
self.processes_var.set(
|
338
347
|
self.settings.get("comp", {}).get("processes", ceil(cpu_count() / 2))
|
@@ -509,6 +518,7 @@ class GUI(Window):
|
|
509
518
|
duration_max=self.duration_max_var.get()
|
510
519
|
if not self.duration_disable_var.get()
|
511
520
|
else None,
|
521
|
+
bg_color=self.bg_color_var.get(),
|
512
522
|
steps=self.steps_var.get(),
|
513
523
|
fake_vid=self.fake_vid_var.get(),
|
514
524
|
scale_filter=self.scale_filter_var.get(),
|
@@ -110,73 +110,33 @@ class CompFrame(LabelFrame):
|
|
110
110
|
else:
|
111
111
|
self.gui.no_compress_var.set(False)
|
112
112
|
|
113
|
-
self.gui.
|
114
|
-
self.gui.
|
115
|
-
self.gui.
|
116
|
-
|
117
|
-
)
|
118
|
-
self.gui.
|
119
|
-
|
120
|
-
)
|
121
|
-
self.gui.
|
122
|
-
|
123
|
-
)
|
124
|
-
self.gui.
|
125
|
-
|
126
|
-
)
|
127
|
-
self.gui.
|
128
|
-
|
129
|
-
)
|
130
|
-
self.gui.
|
131
|
-
|
132
|
-
)
|
133
|
-
self.gui.
|
134
|
-
|
135
|
-
)
|
136
|
-
self.gui.
|
137
|
-
|
138
|
-
)
|
139
|
-
self.gui.
|
140
|
-
self.gui.compression_presets[selection]["quality"]["power"]
|
141
|
-
)
|
142
|
-
self.gui.color_min_var.set(
|
143
|
-
self.gui.compression_presets[selection]["color"]["min"]
|
144
|
-
)
|
145
|
-
self.gui.color_max_var.set(
|
146
|
-
self.gui.compression_presets[selection]["color"]["max"]
|
147
|
-
)
|
148
|
-
self.gui.color_power_var.set(
|
149
|
-
self.gui.compression_presets[selection]["color"]["power"]
|
150
|
-
)
|
151
|
-
self.gui.duration_min_var.set(
|
152
|
-
self.gui.compression_presets[selection]["duration"]["min"]
|
153
|
-
)
|
154
|
-
self.gui.duration_max_var.set(
|
155
|
-
self.gui.compression_presets[selection]["duration"]["max"]
|
156
|
-
)
|
157
|
-
self.gui.img_size_max_var.set(
|
158
|
-
self.gui.compression_presets[selection]["size_max"]["img"]
|
159
|
-
)
|
160
|
-
self.gui.vid_size_max_var.set(
|
161
|
-
self.gui.compression_presets[selection]["size_max"]["vid"]
|
162
|
-
)
|
163
|
-
self.gui.img_format_var.set(
|
164
|
-
self.gui.compression_presets[selection]["format"]["img"]
|
165
|
-
)
|
166
|
-
self.gui.vid_format_var.set(
|
167
|
-
self.gui.compression_presets[selection]["format"]["vid"]
|
168
|
-
)
|
169
|
-
self.gui.fake_vid_var.set(self.gui.compression_presets[selection]["fake_vid"])
|
170
|
-
self.gui.scale_filter_var.set(
|
171
|
-
self.gui.compression_presets[selection]["scale_filter"]
|
172
|
-
)
|
173
|
-
self.gui.quantize_method_var.set(
|
174
|
-
self.gui.compression_presets[selection]["quantize_method"]
|
175
|
-
)
|
176
|
-
self.gui.default_emoji_var.set(
|
177
|
-
self.gui.compression_presets[selection]["default_emoji"]
|
178
|
-
)
|
179
|
-
self.gui.steps_var.set(self.gui.compression_presets[selection]["steps"])
|
113
|
+
preset = self.gui.compression_presets[selection]
|
114
|
+
self.gui.fps_min_var.set(preset.get("fps", {}).get("min"))
|
115
|
+
self.gui.fps_max_var.set(preset.get("fps", {}).get("max"))
|
116
|
+
self.gui.fps_power_var.set(preset.get("fps", {}).get("power"))
|
117
|
+
self.gui.res_w_min_var.set(preset.get("res", {}).get("w", {}).get("min"))
|
118
|
+
self.gui.res_w_max_var.set(preset.get("res", {}).get("w", {}).get("max"))
|
119
|
+
self.gui.res_h_min_var.set(preset.get("res", {}).get("h", {}).get("min"))
|
120
|
+
self.gui.res_h_max_var.set(preset.get("res", {}).get("h", {}).get("max"))
|
121
|
+
self.gui.res_power_var.set(preset.get("res", {}).get("power"))
|
122
|
+
self.gui.quality_min_var.set(preset.get("quality", {}).get("min"))
|
123
|
+
self.gui.quality_max_var.set(preset.get("quality", {}).get("max"))
|
124
|
+
self.gui.quality_power_var.set(preset.get("quality", {}).get("power"))
|
125
|
+
self.gui.color_min_var.set(preset.get("color", {}).get("min"))
|
126
|
+
self.gui.color_max_var.set(preset.get("color", {}).get("max"))
|
127
|
+
self.gui.color_power_var.set(preset.get("color", {}).get("power"))
|
128
|
+
self.gui.duration_min_var.set(preset.get("duration", {}).get("min"))
|
129
|
+
self.gui.duration_max_var.set(preset.get("duration", {}).get("max"))
|
130
|
+
self.gui.img_size_max_var.set(preset.get("size_max", {}).get("img"))
|
131
|
+
self.gui.vid_size_max_var.set(preset.get("size_max", {}).get("vid"))
|
132
|
+
self.gui.img_format_var.set(preset.get("format", {}).get("img"))
|
133
|
+
self.gui.vid_format_var.set(preset.get("format", {}).get("vid"))
|
134
|
+
self.gui.bg_color_var.set(preset.get("bg_color"))
|
135
|
+
self.gui.fake_vid_var.set(preset.get("fake_vid"))
|
136
|
+
self.gui.scale_filter_var.set(preset.get("scale_filter"))
|
137
|
+
self.gui.quantize_method_var.set(preset.get("quantize_method"))
|
138
|
+
self.gui.default_emoji_var.set(preset.get("default_emoji"))
|
139
|
+
self.gui.steps_var.set(preset.get("steps"))
|
180
140
|
|
181
141
|
self.cb_no_compress()
|
182
142
|
self.gui.highlight_fields()
|