ç»åå¦çãããè¦ä»¶ãåºãã®ã§æ軽ã«æ±ããã©ã¤ãã©ãªã¯ç¡ããã®ãã¨æ¢ããçµæãImageMagickã«è¡ãçãã¾ããã ã©ã¤ãã©ãªãå©ç¨ãã¦ã油彩åã¨ã·ã£ã¼ããã¹ãçµã¿åãããå å·¥ãæ½ãããã°ã©ã ã§ãã ãã®å¦çãã¹ã¬ããã«å²ãå½ã¦ããã«ãã¹ã¬ããã§ç»åå¦çãè¡ããã¸ãã¯ãå®è£ ãã¦ã¿ã¾ããã #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <ImageMagick/wand/MagickWand.h> #define SRC_BASE_PATH "src" /* #apt-get install libmagickwand-dev gcc -o img_process img_process.c `pkg-config Wand --cflags --libs`
èªåã®ãã½ã³ã³å¦çã®è¨é²ã ç»åé²è¦§ç¨ã«ã¬ã³ã¿ã«ãµã¼ãã¼ãåãã¦ããã®ã§ããï¼ãã®åº¦ï¼ãµã¼ãã¼ã®æ§æãæ°ãããªãã¾ããã ã·ã¹ãã ä¸ã®æ°ãµã¼ãã¹ããã£ã¹ã¯å®¹éã®ã¢ãããªã©ããã£ãã®ã§ããï¼å½æ¹ã«ã¨ã£ã¦ã¯ï¼å¥æ®µï¼å¬ãããã¨ããªãï¼é¢åãªãã¨ã°ããï¼è¦ç¬ äºåã«ããã£ã¦ãããã¨ã¯ï¼PHPã®ãã¼ã¸ã§ã³ã4â5ã«ä¸ãããã¨ã åãã¦ãããµã¼ãã¼ã¯ï¼ç»åé²è¦§ã«ä½¿ã£ã¦ããï¼PHP4ã使ã£ã¦ããã¾ããï¼ï¼ï¼å¹´åãããPHP5ã«ããã®ã§ç§»è¡ä½æ¥ããã¦ãããã®æ¨ã®é£çµ¡ãè²°ã£ã¦ãã¾ãããï¼ä¼ç¤¾ã®æ¥åãªãã¨ãããï¼èªåã®è¶£å³ã®ã·ã¹ãã ã§ãããæ¾ç½®ãã¦ããã¾ããã ãã©ï¼ä»åã®ãµã¼ãã¼ç§»è¡ãæ©ã«PHP4ã¯ãªããªã£ã¦ï¼PHP5ã ãã«ãªãï¼ã¨ã®ãã¨ãï¼å¾æ¥ã¯ï¼PHP4ã¨PHP5ä½µç¨ï¼ ããããã®ã¯ï¼è©±ã¨ãã¦ã¯ãããã¾ãã®ã§ï¼ä»åã¯ä»æ¹ãªãããªããç°¡åãªã·ã¹ãã ã§ãããï¼æç´ããããã¨ã¯éãã¾ãããã¾ãï¼ãã£ã¦ã¿ã¦ï¼ã
æ¦è¦ ç°¡åãªç»åå¦çæ©è½ãåãããã·ã³ãã«ãã¤é«éããã¦AnimationGIFããµãã¼ãããç»åå½¢å¼å¤æã©ã¤ãã©ãªã® Grappy ãå®è£ ããã ããã®æ§è½ã«ã¤ãã¦ãImageMagick, GDã¨ãä¸è¨ã®æ¯è¼ãè¡ã£ãã SSIMã«ããç»è³ªã®æ¯è¼ å¦çé度 Valgrindã使ã£ããã¼ãã¡ã¢ãªã®ä½¿ç¨é ãã¡ã¤ã«ãµã¤ãºã«é¢ã㦠æå¾ã«ãããã¨ã®æ¯è¼çµæãããGrappyã®åªä½æ§ã«ã¤ãã¦è¿°ã¹ãã 1.ã¯ããã« ç»åã®ã¨ã³ã³ã¼ãã»ãã³ã¼ãããªãµã¤ãºã¨ãã£ãå¦çããµã¼ãã¹ã«çµã¿è¾¼ããã¨èããå ´åãå¤ãã®å ´åã¯é«ã¬ãã«ãªç»åå¦çããµãã¼ãããæ¢åã®ã©ã¤ãã©ãªã®å©ç¨ãæ¤è¨ãããã¨ã¨ãªãã ããããæ¢åã®ã©ã¤ãã©ãªã¯æ©è½ã¨é度ã®ãã©ã³ã¹ãæªãã使ãã«ãããã®ã§ãã£ãã Webãµã¼ãã¹ã®ä¸ã«ç»åé¢ä¿ã®æ©è½ãåãå ¥ããå ´åãæ±ããããã®ã¯æ¬¡ã®ãããªåç´ãªè¦æ±é ç®ã«éãããå ´åãå¤ãã JPEG, PN
ç©åãload averageã«ãªãã®ã§æ³¨æãå¿ è¦ã§ãã ImageMagickãOpenMPãªãã·ã§ã³æå¹ã§ã¤ã³ã¹ãã¼ã«ããéã«ããã«ãã¹ã¬ããå®è¡æã«ç°å¸¸ãªé«è² è·ã«ãªããã¨ãã話ãæãã話é¡ã«ãªã£ã¦ãã¾ãã æè¿AWTã®ç»åå¤æãImageMagickã§é«éåããè¦ä»¶ãããã¾ããã ãã®åãæ¬å½ãªã®ããçå½ã確ãããæ©ä¼ã ã£ãã®ã§è©¦ãã¦ã¿ã¾ãããçµæã æ¬å½ã«ç°å¸¸ãªé«è² è·ã«ãªãã¾ãã OpenMPã§ã©ããããé«è² è·ã«ãªãã ãæ軽ã«OpenMPãç¡å¹ã«ãã ããããOpenMPã¨ã¯ä½ãªã®ã ImageMagickã®é«éå OpenMPã§ã©ããããé«è² è·ã«ãªãã ç§ãå®é試ãã¦ã¿ãçµæã¯ä»¥ä¸ã®éãã§ãããµã¼ãã¹ããã¯ã¯ãCPU Xeon2.6G(8ã³ã¢)ãMem4Gãã§ãã ã¹ã¬ããæ° CPU load average 2ã¹ã¬ãã 100% 20ä»¥ä¸ 4ã¹ã¬ãã 100% 30ä»¥ä¸ 8ã¹
ä¸è¬çã« ImageMagick ã®ãµã ãã¤ã«ç»åçæã¯é ãã¨ããã¦ãããããã©ã¼ãã³ã¹ãæ±ããããã·ã¼ã³ã§ã¯ Imlib2 ãªã©ã®ããé«éãªç»åå¦çã©ã¤ãã©ãªã使ããããã¨ãå¤ãã§ãã Imlib2 ã®é«éãã«ã¤ãã¦ã¯ã以åãImlib2ã§ImageMagickãã3åé«éãã¤ç¾ãããµã ãã¤ã«ç»åã®çæ - åºã®ãã«ã¹ãã¤ãã²ã¤ã¨ããã¨ã®ãã¨ãã¨ããè¨äºã§ç´¹ä»ãã¾ããããã®è¨äºã®ãã³ããã¼ã¯ã«ããã¦ãImlib2 ã«ãããµã ãã¤ã«ç»åã®çæã¯ã ImageMagick ã®3åç¨é«éã§ããã ãããã ImageMagick 㯠Imlib2 ããç»è³ªããããé«æ©è½ã§ä½¿ãããããä»ãé »ç¹ã«ã¡ã³ããã³ã¹ããã¦ãããã¨ã¦ãããåºæ¥ã¦ãã¾ãããã®ç¹ Imlib2 ã¯ã2004å¹´ããã¡ã³ããã³ã¹ããã¦ããããã»ãã¥ãªãã£ãã¼ã«ãè¦ã¤ãã£ã¦ããåLinuxãã£ã¹ããªãã¥ã¼ã·ã§ã³ãããããããããå½ã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}