Skip to content

Commit

Permalink
Updated the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Tourenathan-G5organisation committed Oct 6, 2020
1 parent 00ebe43 commit 9cc0c54
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ To effectively use this library, you must make sure you have added the following
```
#### Compress a video file and return the file path of the new video
```java
String filePath = SiliCompressor.with(Context).compressVideo(videoPath, destinationDirectory);
String filePath = SiliCompressor.with(Context).compressVideo(videoUriString, destinationDirectory);
```
```java
String filePath = SiliCompressor.with(Context).compressVideo(videoContentUri, destinationDirectory);
```
#### Compress an image and return the file path of the new image
```java
String filePath = SiliCompressor.with(Context).compress(imagePath, destinationDirectory);
String filePath = SiliCompressor.with(Context).compress(uriString, destinationDirectory);
```
#### Compress an image and return the file path of the new image while deleting the source image
```java
String filePath = SiliCompressor.with(Context).compress(imagePath, destinationDirectory, true);
String filePath = SiliCompressor.with(Context).compress(uriString, destinationDirectory, true);
```

#### Compress an image drawable and return the file path of the new image
Expand All @@ -45,31 +45,39 @@ String filePath = SiliCompressor.with(Context).compress(R.drawable.icon);

#### Compress an image and return the bitmap data of the new image
```java
Bitmap imageBitmap = SiliCompressor.with(Context).getCompressBitmap(imagePath);
Bitmap imageBitmap = SiliCompressor.with(Context).getCompressBitmap(imageUriString);
```

#### Compress an image and return the bitmap data of the new image while deleting the source image
```java
Bitmap imageBitmap = SiliCompressor.with(Context).getCompressBitmap(imagePath, true);
Bitmap imageBitmap = SiliCompressor.with(Context).getCompressBitmap(imageUriString, true);
```


Download
--------
#### Gradle
```groovy
implementation 'com.iceteck.silicompressorr:silicompressor:2.2.3'
implementation 'com.iceteck.silicompressorr:silicompressor:2.2.4'
```

##### Maven
```xml
<dependency>
<groupId>com.iceteck.silicompressorr</groupId>
<artifactId>silicompressor</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
<type>aar</type>
</dependency>
```

##### Ivy
```xml
<dependency org='com.iceteck.silicompressorr' name='silicompressor' rev='2.2.4'>
<artifact name='silicompressor' ext='pom' ></artifact>
</dependency>
```

Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].

License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public Bitmap getCompressBitmap(String imageUri, boolean deleteSourceImage) thro
* could be in an unknown location
* This uses default values for the converted videos
*
* @param videoFilePath source path for the video file
* @param videoFilePath source uri string for the video file
* @param destinationDir destination directory where converted file should be saved
* @return The Path of the compressed video file
*/
Expand Down

0 comments on commit 9cc0c54

Please sign in to comment.