You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
</div>
16
16
17
-
<palign="center"><b>REACT-NATIVE-GIFSICLE</b> is a react-native package, which helps us to <b>Compress</b> and <b>Manipulate</b>, It is awrapper around<ahref="https://github.com/kohler/gifsicle">Gifsicle CLI</a>
17
+
<palign="center"><b>REACT-NATIVE-GIFSICLE</b> is a react-native package, which helps us to <b>Compress</b> and <b>Manipulate</b>, It is ausing<ahref="https://github.com/kohler/gifsicle">Gifsicle</a> under the hood
18
18
19
19
#Table of Contents
20
20
@@ -114,6 +114,28 @@ if cocoapods are used in the project then pod has to be installed as well:
114
114
5. And go the Build Settings tab. Make sure All is toggled on (instead of Basic)
115
115
6. Look for Header Search Paths and add`$(SRCROOT)/../node_modules/react-native-gifsicle/ios/**` as`non-recursive`
116
116
117
+
##API
118
+
119
+
###`compressGif(uri, options)`
120
+
121
+
Compresses a GIF located at the specified URI using the provided options.
122
+
123
+
####Parameters
124
+
125
+
-`uri` (String): The URI of the GIF to compress.
126
+
-`options` (Object): The options for compression. Available options are:
127
+
-`lossy` (Number): Alter image colors to shrink output file size at the cost of artifacts and noise.`default=200`
-`colors` (Number): Reduce the number of colors to N.`default=255`
130
+
-`scale_x` (Number): Scale the image in the x-axis.
131
+
-`scale_y` (Number): Scale the image in the y-axis.
132
+
-`height` (Number): Resize the output GIF height.
133
+
-`width` (Number): Resize the output GIF width.
134
+
135
+
####Returns
136
+
137
+
- A Promise that resolves to a URI of the compressed GIF.
138
+
117
139
##Consider supporting with a ⭐️[star on GitHub](https://github.com/numandev1/react-native-gifsicle/stargazers)
118
140
119
141
If you are using the library in one of your projects, consider supporting it with a star. It takes a lot of time and effort to keep this maintained and address issues and bugs. Thank you.
@@ -122,4 +144,4 @@ If you are using the library in one of your projects, consider supporting it wit