Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b052e1

Browse files
committed
docs: update
1 parentf188752 commit3b052e1

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

‎README.md‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
</div>
1616

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
1818

1919
#Table of Contents
2020

@@ -114,6 +114,28 @@ if cocoapods are used in the project then pod has to be installed as well:
114114
5. And go the Build Settings tab. Make sure All is toggled on (instead of Basic)
115115
6. Look for Header Search Paths and add`$(SRCROOT)/../node_modules/react-native-gifsicle/ios/**` as`non-recursive`
116116

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`
128+
-`optimize` (Number): Optimize output GIFs.`default=3`
129+
-`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+
117139
##Consider supporting with a ⭐️[star on GitHub](https://github.com/numandev1/react-native-gifsicle/stargazers)
118140

119141
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
122144

123145
[Gifsicle](https://github.com/kohler/gifsicle) by[kohler](https://github.com/kohler)
124146

125-
[Gifsicle Wrapper in Android & Ios](https://github.com/numandev1/react-native-gifsicle.git) by[Numan](https://github.com/numandev1)
147+
[Author of this package](https://github.com/numandev1/react-native-gifsicle.git) by[Numan](https://github.com/numandev1)

‎example/src/App.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ export default function App() {
4444
// width: 300,
4545
});
4646
console.log(compressedUri,'compressedUri');
47-
48-
console.log('compressed uri=>',compressedUri);
4947
setDestImage(compressedUri);
5048
constdestFileStat=awaitstat(compressedUri);
5149
setDestSize(prettyBytes(destFileStat?.size||0));

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript":"tsc --noEmit",
2929
"lint":"eslint\"**/*.{js,ts,tsx}\"",
3030
"prepare":"bob build",
31-
"release":"cd plugin && tsc && cd .. &&release-it",
31+
"release":"release-it",
3232
"example":"yarn --cwd example",
3333
"exampleExpo":"yarn --cwd exampleExpo",
3434
"pods":"cd example && pod-install --quiet",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp