• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tangdiforx/iOSPalette: Objective-C version of Google Palette algorithm in Java.A ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

tangdiforx/iOSPalette

开源软件地址:

https://github.com/tangdiforx/iOSPalette

开源编程语言:

Objective-C 100.0%

开源软件介绍:

iOSPalette

0.1 TODO

Please open an issue if you want some new feature.

0.2 Change Log

  1. The iOSPalatte framework is a static framework,To avoid fail to load the category.You should add "-all_load" to your target "other linker flag" in the building settings.

  2. Fix the memory leak.

  3. When you use the default API:"getPaletteImageColor",you will get a null "allcolorDic" in your callback block.

  4. "Showing the percentage of every color".Due to the issue.

1.Introduction

Objective-C version of Google Palette algorithm in Java.A tool to extract the main color of a image.Compare to traditional algorithm,iOSPalette can help you extract the main color which is more likely to be "The Main Color".It is not always the largest in pixel numbers.

For Chinese user,you can tap the article iOS图片精确提取主色调算法iOS-Palette.It will be helpul.

2.Why iOS-Palette

1.It always help you to extract the color you want,no the largest in the pixel count.Just like this case:

You can see the 6 TargetMode from the demo screenshot.They are distinguished by different Saturation and Lightness (According to HSL Color Mode).

LIGHT_VIBRANT_MODE (High Lightness , High Saturation)

VIBRANT_MODE(Normal Lightness , High Saturation)

DARK_VIBRANT_MODE(Dark Lightness , High Saturation)

LIGHT_MUTED_MODE(High Lightness , Low Saturation)

MUTED_MODE(Normal Lightness , Low Saturation)

DARK_MUTED_MODE(Dark Lightness , Low Saturation)

You can get every target mode color thourgh the iOSPalette API if you need!

2.It helps to combine every single RGB Value into a VBox,then calculate the most representational color.

3.How to use iOS-Palette

You can get these simple API in Palette.h and UIImage+Palette.h:

If you need all target mode info, you can use these API in Palette.h and UIImage.Palette.h:

Then you all get the callback with all color infomation you want:

Tips:The recommendColor is the color for the vibrant target.In case of null,It will be replaced by this order:MUTE_MODE------LIGHT_VIRANT_MODE ------LIGHT_MUTE_MODE------DARK_VIBRANT_MODE------DARK_MUTE_MODE.

Absolutely,you can change the order if you want different performance.

4.Demo

1.Before white background:

2.In the normal illumination:

5.Contact me

if you have any question,you can contact me thourgh the contact infomation below.Or open a issue on Github.I will solve it as soon as possible!Best wishes!

Zhihu:知乎

Email:[email protected]

简书:Tap Here




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap