You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Pythonの画像ライブラリ「pillow」を使って、画像のカラーハーフトーン処理を実装しました。 写真をアメコミ調に変換したいときに、スクリーントーンのような陰影を再現したいときなどに使います。 ハーフトーンは、アメコミのような画風にしたり、ポップなデザインによく使われる効果です。 カラーハーフトーンはCMYKに色分解し、角度をずらしたハーフトーンを重ねる処理です。 カラーの印刷物のような効果になります。 当初は簡単に実装できるだろうとタカをくくっていたのですが、意外と面倒な処理でした。日本語の技術資料はほとんどなかったため、共有&精度向上のためにメモしておきます。 ハーフトーン処理の概要 ハーフトーンは、画像をある角度で配置された単色ドットでグラデーションを擬似的に表現するものです。 角度45°で、pitchはドットの間隔、rはドットの最大半径とすると、下図のようになります。 ここで問
PIL/Pillowはコンパクトで高速なPython用の画像ライブラリです。 よく使う処理をまとめました(随時更新) PILとPillowの違い 基本的にPILを使う理由はありません、Pillowの方がリサイズフィルタのバグフィックスがされており高品質です。 Pillowの速度について Pillowは非常に高速にチューニングされており、同様なライブラリであるImageMagickよりも常に高速に動作します。 ただし、getpixel/putpixelは非常に低速です、画像生成以外には使わないようにしましょう。 更に高速なpillow-simdもあります。概ねオリジナルのPillowの4〜5倍の速度が出るようです。 pillow-simd https://github.com/uploadcare/pillow-simd 参考 Imageモード一覧 モード 説明
Pillow# Pillow is the friendly PIL fork by Jeffrey A. Clark and contributors. PIL is the Python Imaging Library by Fredrik Lundh and contributors. Pillow for enterprise is available via the Tidelift Subscription. Learn more. Overview# The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal
Pillow# Pillow is the friendly PIL fork by Jeffrey A. Clark and contributors. PIL is the Python Imaging Library by Fredrik Lundh and contributors. Pillow for enterprise is available via the Tidelift Subscription. Learn more. Overview# The Python Imaging Library adds image processing capabilities to your Python interpreter. This library provides extensive file format support, an efficient internal
Pillowとは Pillow は、Python の画像処理ライブラリで、Python Imaging Library (PIL)の fork プロジェクトです。 PIL は開発が停滞し Python 2.7 までの対応にとどまっていますが、Pillow は Python 3.3 に対応しています。 2016-04-14 追記:Python 3.5.1 に対応しています。 Pillow 環境 pip インストール可能です。 $ pip install pillow Windows の場合、error: Unable to find vcvarsall.bat というエラーが出て、これは Visual C++ のなにがしを導入すると解消するらしいのですが、僕の環境で2008やら2012やらを入れても解消できなかったので諦めて Mac でやりました。 2013-05-07 追記:Windows
Verified details These details have been verified by PyPI Maintainers aclark hugovk radarhere wiredfool Unverified details These details have not been verified by PyPI Project links Changelog Documentation Funding Homepage Mastodon Release notes Source GitHub Statistics View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery Meta License: Historical Per
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く