Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chengdazhi/StyleImageView
Add styles and filters to ImageViews, Views' backgroud, Drawables and Bitmaps, with animation and bitmap output.
https://github.com/chengdazhi/StyleImageView
Last synced: about 1 month ago
JSON representation
Add styles and filters to ImageViews, Views' backgroud, Drawables and Bitmaps, with animation and bitmap output.
- Host: GitHub
- URL: https://github.com/chengdazhi/StyleImageView
- Owner: chengdazhi
- License: apache-2.0
- Created: 2016-08-17T10:49:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-17T04:48:26.000Z (almost 8 years ago)
- Last Synced: 2024-10-30T00:32:23.134Z (about 1 month ago)
- Language: Java
- Homepage:
- Size: 8.5 MB
- Stars: 1,452
- Watchers: 32
- Forks: 147
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - StyleImageView - 图片相关视图的风格添加及亮度对比度设置 (图片)
README
# StyleImageView
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-StyleImageView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/4246)
## Introduction
![gif_sample](./images/style_sample.gif)
[中文见这里](https://github.com/chengdazhi/StyleImageView/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E%E9%A1%B5)
This library can set the style of ImageView/View background/Drawable/Bitmap and also brightness & contrast. This library now supports 10 different styles, you can check them out below. You can enable animation, and choose to set Interpolators and Listeners. You can acquire the Bitmap of ImageView/View/Drawable after style is set.
If you only need to operate ImageViews, you can use the StyleImageView class. You can specify attributes from layout file. If you are already using custom ImageViews, or you want to operate on View's background, or any Drawable or Bitmap, you can use the Styler class.
**Note that this library uses ColorFilter to achieve effects. If you are using ColorFilter in your project, this may cause conflicts.**
## Try Sample
You can go to [chengdazhi.com/styleimageview](http://chengdazhi.com/styleimageview) to download sample APK file or scan this QR code:
![qr](./images/style_image_view_qr.png)
## Feature
StyleImageView supports 10 styles as follow. Note that you can set brightness and contrast on top of them. Example of Saturation mode is not listed, since this mode needs a saturation input.
| Modes | Sea Shore | Boat and Houses |
| --------------- | --------- | --------------- |
| Original | ![sea_original](./images/sea_original.png) | ![boat_original](./images/boat_original.png) |
| Grey Scale | ![sea_grey_scale](./images/sea_grey_scale.png) | ![boat_grey_scale](./images/boat_grey_scale.png) |
| Invert | ![sea_invert](./images/sea_invert.png) | ![boat_invert](./images/boat_invert.png) |
| RGB to BGR | ![sea_rgb_to_bgr](./images/sea_rgb_to_bgr.png) | ![boat_rgb_to_bgr](./images/boat_rgb_to_bgr.png) |
| Sepia | ![sea_sepia](./images/sea_sepia.png) | ![boat_sepia](./images/boat_sepia.png) |
| Black & White | ![sea_black_and_white](./images/sea_black_and_white.png) | ![boat_black_and_white](./images/boat_black_and_white.png) |
| Bright | ![sea_bright](./images/sea_bright.png) | ![boat_bright](./images/boat_bright.png) |
| Vintage Pinhole | ![sea_vintage_pinhole](./images/sea_vintage_pinhole.png) | ![boat_vintage_pinhole](./images/boat_vintage_pinhole.png) |
| Kodachrome | ![sea_kodachrome](./images/sea_kodachrome.png) | ![boat_kodachrome](./images/boat_kodachrome.png) |
| Technicolor | ![sea_technicolor](./images/sea_technicolor.png) | ![boat_technicolor](./images/boat_technicolor.png) |Some combinations I recommend:
* Invert + (150 brightness) + (2.0F contrast)
* Sepia + (-50 brightness) + (2.0F contrast)
* Kodachrome + (-100 brightness) + (1.6F contrast)**Try out the sample to find out more!**
## Import
Gradle
dependencies {
compile 'it.chengdazhi.styleimageview:styleimageview:1.0.4'
}Maven
it.chengdazhi.styleimageview
styleimageview
1.0.4
pom
## Usage
See [Wiki](https://github.com/chengdazhi/StyleImageView/wiki) or [中文版](https://github.com/chengdazhi/StyleImageView/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E%E9%A1%B5)
## License
Copyright 2016 chengdazhi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.