? ??? :
Imagick? ??? ?? ?? ??? ???? ???? ???? ? ??? ??? ??? PHP ?? ????????.
-
?? ???? Timothy Boronczyk? ?? ???? Imagick ? ???? ???? ???? ?? ??? ??? ??? ??????. ? ??? ?? ???? ???? ??? ??? ???? ??? ?????. ?? PHP? Imagick API ??? ?? ???? Imagemagick ? ????? ?? ?? ? ??? ????. ?? ? ??? PHP ??? ???? ?? ??? ??? ?????? ?? ??? ?? ????. ?? ??? ??? ? ?? ?? ??? ?????.
-
annotateImage()
???? ???? ?????? ?? ??? ?? ??? ????? ???? ?? ?????? ????. ?? ? ??? ??? ???? -
?? ?? : -
? ??? ?? ???? ?? ??? ?? ?????. ?????? ???? ???? ??? ?? ??? ??? ??? ??? ? ????. setFillColor()
setFontSize()
?? ???? ???? ?? ???? ?????? ?? ???? ? ???? ???? ?? ???? ???? ?? ???? ?? ? ????. ?? ? ? : setFont()
<: :> PHP ?? :setFillOpacity()
?? ?? : annotateImage()
?? ? PHP ?? :
? ??? ??? ?????, ? ?? ??? $watermark
? ??? ?? ?? ???? ??? ???? ???? ???? ?? ? ??? ?????. ?? ???? ?? ???? ?? ? ?, $mask
?? ???? ?? ???? ? ?? ?? ??? ?? ??? ??? ? ???? ????? ????. ?? ? ?? ???? ?? ???? ?? ????? ?? ??? ?????? ?? ??? ? $mask
???? ? ?? ?? ? ??? ???? ?? ???? ????? ? ????. ?, ????? ??? ?? ??? ??? ?? ??? ?? ?? ?? ???? ??????. ? ??? ???? ?? ?? ? ?? ???? ?? ???? ??? ????? ???? ???? ????. compositeImage()
setGravity()
??? ???
convert image.png -font Arial -pointsize 20 \ -draw "gravity south \ fill black text 0,12 'Copyright' \ fill white text 1,11 'Copyright'" \ result.png? ??> <<> ??
<?php // 創(chuàng)建對(duì)象 $image = new Imagick('image.png'); // 水印文本 $text = 'Copyright'; // 創(chuàng)建新的繪圖面板 $draw = new ImagickDraw(); // 設(shè)置字體屬性 $draw->setFont('Arial'); $draw->setFontSize(20); $draw->setFillColor('black'); // 將文本定位在圖像的右下角 $draw->setGravity(Imagick::GRAVITY_SOUTHEAST); // 在圖像上繪制文本 $image->annotateImage($draw, 10, 12, 0, $text); // 稍微偏移位置,使用不同的顏色再次繪制文本 $draw->setFillColor('white'); $image->annotateImage($draw, 11, 11, 0, $text); // 設(shè)置輸出圖像格式 $image->setImageFormat('png'); // 輸出新圖像 header('Content-type: image/png'); echo $image; ?>
<<> (Fotolia? ??)
? ??> <<> (??? FAQ??, ??? ??? ?? ???? ?? ?????? ?? ?? ???? ???????) ? ??>
<<> Q : PHP?? Imagick? ???? ???? ??? ?? ??? ???? ??? ?????? setFillOpacity()
<<>
<<> Q : imagick?? Watermark ???? ?? ??? ???? ??? ?????? <<>
<<> Q : imagick?? Watermark ???? ?? ??? ???? ??? ??????
<<>convert image.png -font Arial -pointsize 20 \ -draw "gravity south \ fill black text 0,12 'Copyright' \ fill white text 1,11 'Copyright'" \ result.png
<<> Q : Imagick?? Watermark ???? ??? ???? ??? ?????? <<>
? ??> <<> Q : Imagick?? Watermark ???? ????? ??? ??????
<<><?php // 創(chuàng)建對(duì)象 $image = new Imagick('image.png'); // 水印文本 $text = 'Copyright'; // 創(chuàng)建新的繪圖面板 $draw = new ImagickDraw(); // 設(shè)置字體屬性 $draw->setFont('Arial'); $draw->setFontSize(20); $draw->setFillColor('black'); // 將文本定位在圖像的右下角 $draw->setGravity(Imagick::GRAVITY_SOUTHEAST); // 在圖像上繪制文本 $image->annotateImage($draw, 10, 12, 0, $text); // 稍微偏移位置,使用不同的顏色再次繪制文本 $draw->setFillColor('white'); $image->annotateImage($draw, 11, 11, 0, $text); // 設(shè)置輸出圖像格式 $image->setImageFormat('png'); // 輸出新圖像 header('Content-type: image/png'); echo $image; ?>
<<> Q : imagick? ?? ?? ???? ???? ??? ?????? <<>
<<> Q : imagick?? ?? ?? ???? ???? ???? ???
convert -size 300x50 xc:grey30 -font Arial -pointsize 20 \ -gravity center -draw "fill grey70 text 0,0 'Copyright'" \ fgnd.png convert -size 300x50 xc:black -font Arial -pointsize 20 -gravity center \ -draw "fill white text 1,1 'Copyright' \ text 0,0 'Copyright' \ fill black text -1,-1 'Copyright'" \ +matte mask.png composite -compose CopyOpacity mask.png fgnd.png stamp.png mogrify -trim +repage stamp.png composite -gravity south -geometry +0+10 stamp.png image.png \ result.png
Q : imagick? ?? ???? ?? ?? ???? ???? ??? ??????
? ??? PHP ??? | Imagick? ?? ??? ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2
