yohei #3295(2007/10/08 12:27 GMT) [ Prolog ] Rating1/1=1.00
SWI-Prologで,http_client,XPCEを使用.
1 2 3 4 5 6 7 8 9 10 11
:- use_module(library('http/http_client')). :- use_module(library(pce)). get_inv(URL, SavePath) :- http_get(URL, Buff, [codes]), new(Image, image), send(Image, load(text_buffer(Buff))), send(Image, invert), send(Image, save(SavePath, jpeg)). :- get_inv('http://example.com/sample.jpg', 'sample.jpg').
Rating1/1=1.00-0+
[ reply ]
yohei
#3295()
[
Prolog
]
Rating1/1=1.00
:- use_module(library('http/http_client')). :- use_module(library(pce)). get_inv(URL, SavePath) :- http_get(URL, Buff, [codes]), new(Image, image), send(Image, load(text_buffer(Buff))), send(Image, invert), send(Image, save(SavePath, jpeg)). :- get_inv('http://example.com/sample.jpg', 'sample.jpg').Rating1/1=1.00-0+
[ reply ]