Skip to main content

Covers most scenarios as much as possible, demonstrates how to build a Python pypi project, and is also useful for analyzing image color themes

Project description

PyPI Version PyPI Supported Versions License PyPI - Downloads Downloads Downloads Per Month Supported Platforms PyPI - Implementation PyPI - Wheel Bitbucket Pipelines GitHub last commit GitHub commit activity GitHub code size in bytes GitHub language count

项目依赖比较简单,可以使用无依赖安装:

pip install color-theme-analyse --no-deps

如果你设置的全局镜像未收录本项目,请使用以下的命令从官方仓库安装或者手动指定镜像:

pip install color-theme-analyse --no-deps -i https://pypi.org/simple

以下镜像收录了本项目:

如果你使用的是校园网,可以使用腾讯镜像下载本项目

pip install color-theme-analyse[base] -i https://mirrors.tencent.com/pypi/simple


如果出于pypi学习目的首次下载,建议使用下面的下载命令:(推荐)

pip install color-theme-analyse[base,dev] -i https://mirrors.tencent.com/pypi/simple

等效于 pip install color-theme-analyse[merge] -i https://mirrors.tencent.com/pypi/simple

安装后使用终端命令 MMCQsc运行

支持以下终端命令(Linux平台需要注意大小写):

MMCQsc
RunMMCQsc
DoMMCQsc
MMCQscPure
MMCQscR
MMCQscR1
MMCQscR2

项目地址

Gitee

Github(偶尔同步)

GitLab(偶尔同步)

GitCode

Pypi(官方仓库)

libraries.io(同步官方仓库)

下载所有源文件 -> Links for color-theme-analyse (tencent.com)

当前默认分支为 dev2022

master,pypi 分支已停止维护

源仓库在 Bitbucket,因此会首先得到同步

Bug 反馈和 Issues 提交在Gitee或Github,在 Gitee 会得到最快反馈

请勿在 Github 或 GitLab 提交 Issues ,它们只是同步仓库,不会处理任何提交的 Issues

简介

基于MMCQ对图片进行色彩主题分析,采用图片压缩和多进程来加速批量分析速度。

master 分支是功能实现的 Simple Demo

pypi 分支是 基于master分支重构的 Python Package 打包发布的 Simple Demo

embed 分支是 基于 pypi分支重构的 嵌入式版本 Simple Demo

本项目是ImageColorTheme的(MMCQ)具体实现,ImageColorTheme的GitHub(国内镜像)地址:

GitHub - rainyear/ImageColorTheme: Extract Color Themes from Images (fastgit.org)

本项目同时也是SCMD开源计划的一部分

Requires

要求的版本 3.10.0 > Python >= 3.9.0

建议的版本 Python == 3.9.5

from multiprocessing import shared_memory required for Python >= 3.8

要求的操作系统 Windows >= 1909 ( Win 10 / 11 )

建议的操作系统 Windows>=22000.100( Win 11 Dev )

必要的 Python 第三方库依赖:numpy, opencv-python, pillow, easygui, rich

本项目使用了 React 框架(非项目构建,只是运行时 Babel


教程

Build

python setup.py bdist_wheel

调试请运行 color_theme_analyse.py

这是为 Windows 平台专门开发的,无法在 Linux 中获得完美体验,同时可能存在部分兼容问题

Feature

Customize

str(hex(k))[-2:].replace('x', '0').upper()

本demo处理结果由RGB转为16进制,可根据需要不转换或者转为其他颜色表达形式。

MMCQ(d, 5)

本demo默认颜色主题为5个颜色,可根据需要减少或者增加(注意:主题色越多,分析速度越慢)。

本demo限制一次最多处理1020图片,不建议修改,更多图片分批次处理即可

Scheme

  • embed 版本:Pillow 更换为嵌入版本,Numpy, rich 改为动态引用,弃用 OpenCV-Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

color_theme_analyse-1.145.6-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file color_theme_analyse-1.145.6-py3-none-any.whl.

File metadata

  • Download URL: color_theme_analyse-1.145.6-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for color_theme_analyse-1.145.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c422a03caa765bdc69de2f3257c51df68229f276a46f4f054676c7e36dfa34f6
MD5 4a4b2a4c9a2007047184f23fec9d1306
BLAKE2b-256 b8628b114e4560fb3d0f2a0e4055e8bf8df95cf3d6e7fcba2ba68e6006fc4c7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page