Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-gifsicle
Advanced tools
Readme
REACT-NATIVE-GIFSICLE is a react-native package, which helps us to Compress, Optimize and Manipulate Gif, It is a using Gifsicle under the hood
yarn add react-native-gifsicle
You can give feedback on Discord channel
expo install react-native-gifsicle
Add the Gifsicle plugin to your Expo config (app.json
, app.config.json
or app.config.js
):
{
"name": "my app",
"plugins": ["react-native-gifsicle"]
}
Finally, compile the mods:
expo prebuild
import RNGifsicle from 'react-native-gifsicle';
const manipulatedUri = await RNGifsicle.compressGif(uri, {
lossy: 100,
colors: 250,
// scale_x: 2,
// scale_y: 2,
// optimize:3
// height: 250,
// width: 300,
});
Install the package:
yarn add react-native-gifsicle
Link the library:
(Note: For React Native 0.60 or greater, autolinking is available)
or later. For earlier versions you need to manually link the module.)
react-native link react-native-gifsicle
if cocoapods are used in the project then pod has to be installed as well:
(cd ios; pod install)
Manual Link (iOS)
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-gifsicle
and add Gifsicle.xcodeproj
Gifsicle.xcodeproj
➜ Products
folderGifsicle.a
to your project's Build Phases
➜ Link Binary With Libraries
$(SRCROOT)/../node_modules/react-native-gifsicle/ios/**
as non-recursive
compressGif(uri, options)
Compresses a GIF located at the specified URI using the provided options.
uri
(string): The URI of the GIF to compress.options
(object): The options for compression. Available options are:
lossy
(number): Alter image colors to shrink output file size at the cost of artifacts and noise. default=200
range [0-200]
optimize
(number): Optimize output GIFs. default=3
range [1-3]
colors
(number): Reduce the number of colors to N. default=255
rage [0-255]scale_x
(number): Scale the image in the x-axis.scale_y
(number): Scale the image in the y-axis.height
(number): Resize the output GIF height.width
(number): Resize the output GIF width.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.
FAQs
Compress, Optimize and Manipulate GIF in React Native
The npm package react-native-gifsicle receives a total of 1 weekly downloads. As such, react-native-gifsicle popularity was classified as not popular.
We found that react-native-gifsicle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.