iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
XDDD
V2EX  ›  iDev

基于 Swift 的主题色提取库: ColorArtwork

  •  
  •   XDDD · Mar 4, 2017 · 3969 views
    This topic created in 3390 days ago, the information mentioned may be changed or developed.

    从一张图片中提取出 1 个背景色和 3 个主题色。

    基于这个博客的算法,只用了 CoreGraphics 所以兼容果家的全平台。

    https://github.com/XQS6LB3A/ColorArtwork

    大概效果:

    2 replies    2017-03-05 18:03:48 +08:00
    yepinf
        1
    yepinf  
       Mar 4, 2017
    挺好玩的样子,用于图文混编很合适

    支持一下
    XDDD
        2
    XDDD  
    OP
       Mar 5, 2017
    @yepinf 目前只考虑到用于专辑插图,其他用途请注意:
    - 处理时直接丢弃了 alpha 通道,透明图片的结果可能和预期不一致
    - 由于要对图片中所有像素计数,速度可能稍慢。一张 600*600 的图片要花费 0.1 秒
    - 为了提高效率,过大的图片将自动缩放至 300*300 ,处理时间降至 0.03 秒
    - 如果图片比较复杂,缩放后颜色的准确度会降低。若有此要求,请手动指定图片尺寸
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5422 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 03:45 · PVG 11:45 · LAX 20:45 · JFK 23:45
    ♥ Do have faith in what you're doing.