WEBシステム開発・デザイン制作などすべての作業を一貫してご提供しております。(大阪・東京近辺)

Imagick::blackThresholdImage ピクセルを黒に PHP 写真・画像加工 編集

Imagick::blackThresholdImage 閾値に満たないすべてのピクセルを黒にする


(PECL imagick 2.0.0)


PHPとImagemagick(Imagick)を使って写真・画像を加工編集


説明

bool Imagick::blackThresholdImage ( mixed $threshold )

警告

この関数は、現在のところ詳細な情報はありません。引数のリストのみが記述されています。

Imagick::thresholdImage() と似ていますが、 これは閾値に満たないピクセルをすべて黒にし、その他のピクセルはそのままにします。

パラメータ

threshold

すべて黒にする閾値。

返り値

成功した場合に TRUE を返します。

変更履歴

バージョン 説明
2.1.0 色を表す文字列をパラメータとして指定できるようになりました。 これまでのバージョンでは ImagickPixel オブジェクトしか指定できませんでした。

add a note add a note User Contributed Notes
Imagick::blackThresholdImage
elmer at web-axis dot net
30-Nov-2008 11:33
Here’s a example of this function:

<?php
$img = new Imagick();
$img->readImage($image_file_name);
$img->blackThresholdImage(‘grey’);
$img->writeImage($thumb_file_name);
$img->clear();
$img->destroy();
?>


animate

animate an image sequence on any X server.
compare

mathematically and visually annotate the difference between an image and its reconstruction.
composite

overlap one image over another.
conjure

interpret and execute scripts written in the Magick Scripting Language (MSL).
convert

convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
display

display an image or image sequence on any X server.
identify

describe the format and characteristics of one or more image files.
import

save any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.
mogrify

resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert writes to a different image file.
montage

create a composite image by combining several separate images. The images are tiled on the composite image optionally adorned with a border, frame, image name, and more.
stream

a lightweight tool to stream one or more pixel components of the image or portion of the image to your choice of storage formats. It writes the pixel components as they are read from the input image a row at a time making stream desirable when working with large images or when you require raw pixel components.


生命がある

どんなXサーバの画像シーケンスも活気づけてください。
比較してください。

数学的に目視によりイメージとその再建の違いを注釈してください。
合成物

別のものの上で1つのイメージを重ね合わせてください。
呼び出してください。

Magick Scripting Language(MSL)に書かれたスクリプトを、解釈して、作成してください。
転向者

イメージ、ぼやけ、作物、「反-小斑点を付け」る震えをリサイズして、利用して、宙返りして、接合するのと同じくらい良い画像形式と、再のサンプルと、はるかに多くの間で変換してください。
ディスプレイ

どんなXサーバのイメージか画像シーケンスも表示してください。
特定してください。

1つ以上のイメージ・ファイルの形式と特性について説明してください。
輸入

Xサーバにどんな可視ウィンドウも保存して、イメージ・ファイルとしてそれを出力します。 あなたは単一の窓、全体のスクリーン、またはスクリーンのどんな長方形の部分も得ることができます。
mogrifyします。

はるかにイメージをリサイズしてください、そして、ぼけてください、そして、実ってください、そして、「反-小斑点を付け」る、うろたえてください、そして、利用してください、そして、はじき出してください、そして、接合してください、そして、再抽出してください。 Mogrifyする、オリジナルが像を描く重ね書きはファイルされますが、転向者は異なったイメージ・ファイルに書きます。
モンタージュ

いくつかの別々のイメージを結合することによって、合成画像を作成してください。 イメージは任意に境界、フレーム、イメージ名、およびその他に飾った合成画像でタイルを張られます。
ストリーム

イメージの1画素以上の成分かイメージの部分をあなたのストレージ形式の選択に流す軽い道具。 それは入力画像からの一度に行が、大きいイメージで働いているとき、ストリームを望ましくしながらそれらに読み込まれるか、またはあなたが生の画素成分を必要とするときに時画素成分を書きます。


ImageMagickへの紹介

ImageMagick?は、ビットマップイメージを作成して、編集して、構成するソフトウェアスイートです。 DPX、EXR、GIF、JPEG、JPEG-2000、PDF、PhotoCD、PNG、Postscript、SVG、およびTIFFを含んでいて、それは、さまざまな形式(100以上)でイメージを読んで、変換して、書くことができます。 翻訳するのにImageMagickを使用するか、宙返りするか、イメージを反映して、回転して、スケーリングして、剪断して、変えるか、イメージ色を調整するか、様々な特殊効果を適用するか、またはテキスト、系列、多角形、楕円、およびBを描いてください–zierカーブ。

ImageMagickの機能性がコマンドラインから通常利用されるか、またはあなたはあなたのお気に入りのプログラミング言語で書かれたプログラムから特徴を使用できます。 これらのインタフェースから、選んでください: G2F(Ada)、MagickCore(C)、MagickWand(C)、ChMagick(Ch)、ImageMagickObject(COM+)、魔法++(C++)JMagick(Java)、L-魔法(舌たらずに話す)、NMagick(Neko/haXe)、MagickNet(.NET)、PascalMagick(パスカル)、PerlMagick(Perl)、PHPのためのMagickWand(PHP)、IMagick(PHP)、PythonMagick(パイソン)、RMagick(ルビー)、またはTclMagick(Tcl/TK)。 イメージをダイナミックにautomagicallyにImageMagickを使用して、変更するか、または言語インターフェースと共に、作成してください。

ImageMagickは、経営への持ち合わせの二極分布として、または、あなたが開いているものと同様に独占であるアプリケーションに自由に使用して、コピーして、変更して、広げることができるソースコードとして提供されたフリーソフトウェアです。 それは、OSSCCによってアパッチの2.0スタイルのライセンスの下で分配されて、OSIによって承認されて、使用のために推薦されます。

ImageMagick開発過程は安定したAPIとABIを確実にします。 それぞれのImageMagickリリースの前に、私たちは、セキュリティの脆弱性を防ぐためにメモリとスレッド誤り検出を含んでいる包括的安全保障査定を実行します。


*adaptive*blur *adaptive*resize *adaptive*sharpen *adjoin *affine *alpha *annotate *antialias *append *attenuate *authenticate *auto*gamma *auto*level *auto*orient *backdrop *background *bench *bias *blackpoint*compensation *black*threshold *blend *blue*primary *blue*shift *blur *border *bordercolor *borderwidth *brightness*contrast *cache *caption *cdl *channel *charcoal *chop *clamp *clip *clip*mask *clip*path *clone *clut *coalesce *colorize *colormap *color*matrix *colors *colorspace *combine *comment *compose *composite *compress *contrast *contrast*stretch *convolve *crop *cycle *debug *decipher *deconstruct *define *delay *delete *density *depth *descend *deskew *despeckle *direction *displace *display *dispose *dissimilarity*threshold *dissolve *distort *dither *draw *edge *emboss *encipher *encoding *endian *enhance *equalize *evaluate *evaluate*sequence *extent *extract *family *features *fft *fill *filter *flatten *flip *floodfill *flop *font *foreground *format *format[identify] *frame *frame[import] *function *fuzz *fx *gamma *gaussian*blur *geometry *gravity *green*primary *hald*clut *help *highlight*color *iconGeometry *iconic *identify *ift *immutable *implode *insert *intent *interlace *interpolate *interline*spacing *interword*spacing *kerning *label *lat *layers *level *level*colors *limit *linear*stretch *linewidth *liquid*rescale *list *log *loop *lowlight*color *magnify *map *map[stream] *mask *mattecolor *median *metric *mode *modulate *monitor *monochrome *morph *morphology *mosaic *motion*blur *name *negate *noise *normalize *opaque *ordered*dither *orient *page *paint *path *pause[animate] *pause[import] *pen *ping *pointsize *polaroid *posterize *precision *preview *print *process *profile *quality *quantize *quiet *radial*blur *raise *random*threshold *red*primary *regard*warnings *region *remap *remote *render *repage *resample *resize *respect*parentheses *reverse *roll *rotate *sample *sampling*factor *scale *scene *screen *seed *segment *selective*blur *separate *sepia*tone *set *shade *shadow *shared*memory *sharpen *shave *shear *sigmoidal*contrast *silent *size *sketch *snaps *solarize *sparse*color *splice *spread *stegano *stereo *stretch *strip *stroke *strokewidth *style *subimage*search *swap *swirl *taint *text*font *texture *threshold *thumbnail *tile *tile*offset *tint *title *transform *transparent *transparent*color *transpose *transverse *treedepth *trim *type *undercolor *unique*colors *units *unsharp *update *verbose *version *view *vignette *virtual*pixel *visual *watermark *wave *weight *white*point *white*threshold *window *window*group *write


libjpeg62
libbz2
libtiff4
libwmf
libz
libpng12
libx11
libxt
libxext
libxml2
libfreetype6
liblcms1
libexif
libltdl3

libjpeg62-dev
libbz2-dev
libtiff4-dev
libwmf-dev
libz-dev
libpng12-dev
libx11-dev
libxt-dev
libxext-dev
libxml2-dev
libfreetype6-dev
liblcms1-dev
libexif-dev
libltdl3-dev


ImageMagick(イメージマジック)のコマンド

display : イメージの表示、及び編集する
import : 表示されているウインドウをイメージファイルにする
animate : 指定されたイメージのシーケンスをアニメーション化する
montage : イメージをモンタージュ写真のように合成する
convert : 入力されたイメージを指定されたフォーマットに出力する
mogrify : イメージの拡大・回転をする
identify : 指定されたイメージに関する情報を出力する


主な画像ファイル形式

* BMP (Windowsビットマップ)
* DPX
* FlashPix
* GIF
* HD Photo
* JPEG
* JPEG 2000
* JPEG XR
* MAG
* OpenEXR
* PICT
* PNG
* RAW画像
* TGA
* TIFF
* XBM (X11ビットマップ)
* アニメーションgif

ベクターイメージ

* DXF
* EPS
* HP-GL
* SVG
* Windows メタファイル


写真エフェクト処理のいろいろ

フェードイン
フェードアウト
クロスフェード
ワイプ
ビューチェンジ