1
1
# Convert
2
2
3
- > Auto-generated documentation for [ tstickers.convert] ( ../../../tstickers/convert.py ) module.
3
+ [ Tstickers Index] ( ../README.md#tstickers-index ) /
4
+ [ Tstickers] ( ./index.md#tstickers ) /
5
+ Convert
4
6
5
- Sticker convert functions used by the downloader .
7
+ > Auto-generated documentation for [ tstickers.convert ] ( ../../../tstickers/convert.py ) module .
6
8
7
- - [ Tstickers ] ( ../README.md#tstickers-index ) / [ Modules ] ( ../MODULES.md#tstickers-modules ) / [ Tstickers ] ( index.md#tstickers ) / Convert
8
- - [ assureDirExists] ( #assuredirexists )
9
- - [ convertTgs] ( #converttgs )
10
- - [ convertWebp] ( #convertwebp )
11
- - [ convertWithPIL] ( #convertwithpil )
9
+ - [ Convert ] ( #convert )
10
+ - [ assureDirExists] ( #assuredirexists )
11
+ - [ convertTgs] ( #converttgs )
12
+ - [ convertWebp] ( #convertwebp )
13
+ - [ convertWithPIL] ( #convertwithpil )
12
14
13
15
## assureDirExists
14
16
15
- [[ find in source code]] ( ../../../tstickers/convert.py#L13 )
16
-
17
- ``` python
18
- def assureDirExists (root : Path, directory : Path | str ) -> Path:
19
- ```
17
+ [ Show source in convert.py:13] ( ../../../tstickers/convert.py#L13 )
20
18
21
19
make the dir if not exists
22
20
@@ -29,19 +27,19 @@ make the dir if not exists
29
27
30
28
- ` Path ` - the full path
31
29
32
- ## convertTgs
33
-
34
- [[ find in source code]] ( ../../../tstickers/convert.py#L72 )
30
+ #### Signature
35
31
36
32
``` python
37
- def convertTgs (
38
- swd : Path,
39
- threads : int = 4 ,
40
- frameSkip : int = 1 ,
41
- scale : float = 1 ,
42
- ) -> int :
33
+ def assureDirExists (root : Path, directory : Path | str ) -> Path:
34
+ ...
43
35
```
44
36
37
+
38
+
39
+ ## convertTgs
40
+
41
+ [ Show source in convert.py:72] ( ../../../tstickers/convert.py#L72 )
42
+
45
43
Convert animated stickers to webp, gif and png
46
44
47
45
#### Arguments
@@ -57,14 +55,19 @@ for optimisation with a quality trade-off. Defaults to 1.
57
55
58
56
- ` int ` - number of stickers successfully converted
59
57
60
- ## convertWebp
61
-
62
- [[ find in source code]] ( ../../../tstickers/convert.py#L44 )
58
+ #### Signature
63
59
64
60
``` python
65
- def convertWebp (swd : Path, threads : int = 4 ) -> int :
61
+ def convertTgs (swd : Path, threads : int = 4 , frameSkip : int = 1 , scale : float = 1 ) -> int :
62
+ ...
66
63
```
67
64
65
+
66
+
67
+ ## convertWebp
68
+
69
+ [ Show source in convert.py:44] ( ../../../tstickers/convert.py#L44 )
70
+
68
71
Convert static stickers to png and gif
69
72
70
73
#### Arguments
@@ -76,14 +79,19 @@ Convert static stickers to png and gif
76
79
77
80
- ` int ` - number of stickers successfully converted
78
81
79
- ## convertWithPIL
80
-
81
- [[ find in source code]] ( ../../../tstickers/convert.py#L27 )
82
+ #### Signature
82
83
83
84
``` python
84
- def convertWithPIL (inputFile : str ) -> str :
85
+ def convertWebp (swd : Path, threads : int = 4 ) -> int :
86
+ ...
85
87
```
86
88
89
+
90
+
91
+ ## convertWithPIL
92
+
93
+ [ Show source in convert.py:27] ( ../../../tstickers/convert.py#L27 )
94
+
87
95
Convert the webp file to png
88
96
89
97
#### Arguments
@@ -93,3 +101,12 @@ Convert the webp file to png
93
101
#### Returns
94
102
95
103
- ` str ` - path to input file
104
+
105
+ #### Signature
106
+
107
+ ``` python
108
+ def convertWithPIL (inputFile : str ) -> str :
109
+ ...
110
+ ```
111
+
112
+
0 commit comments