StyleImageView

Add styles and filters to ImageViews, Views' backgroud, Drawables and Bitmaps, with animation and bitmap output.

  • 所有者: chengdazhi/StyleImageView
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

StyleImageView

Android Arsenal

Introduction

gif_sample

中文见这里

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 to download sample APK file or scan this QR code:

qr

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, boat_original, Grey Scale, sea_grey_scale, boat_grey_scale, Invert, sea_invert, boat_invert, RGB to BGR, sea_rgb_to_bgr, boat_rgb_to_bgr, Sepia, sea_sepia, boat_sepia, Black & White, sea_black_and_white, boat_black_and_white, Bright, sea_bright, boat_bright, Vintage Pinhole, sea_vintage_pinhole, boat_vintage_pinhole, Kodachrome, sea_kodachrome, boat_kodachrome, Technicolor, sea_technicolor, boat_technicolor, 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

<dependency>
    <groupId>it.chengdazhi.styleimageview</groupId>
    <artifactId>styleimageview</artifactId>
    <version>1.0.4</version>
    <type>pom</type>
</dependency>

Usage

See Wiki or 中文版

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 at

   http://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.

主要指标

概览
名称与所有者chengdazhi/StyleImageView
主编程语言Java
编程语言Java (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2016-08-17 10:49:18
推送于2017-01-17 04:48:26
最后一次提交2017-01-17 12:48:26
发布数0
用户参与
星数1.4k
关注者数31
派生数147
提交数24
已启用问题?
问题数3
打开的问题数2
拉请求数1
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?