Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,16 +1,16 @@
|
|||
:- module(bitmapIO, [
|
||||
write_ppm_p6/2]).
|
||||
write_ppm_p6/2]).
|
||||
|
||||
:- use_module(library(lists)).
|
||||
|
||||
%write_ppm_p6(File,Bitmap)
|
||||
write_ppm_p6(Filename,[[X,Y],Pixels]):-
|
||||
open(Filename,write,Output,[encoding(octet)]),
|
||||
%write p6 header
|
||||
writeln(Output, 'P6'),
|
||||
atomic_list_concat([X, Y], ' ', Dimensions),
|
||||
writeln(Output, Dimensions),
|
||||
writeln(Output, '255'),
|
||||
%write bytes
|
||||
maplist(maplist(maplist(put_byte(Output))),Pixels),
|
||||
close(Output).
|
||||
open(Filename,write,Output,[encoding(octet)]),
|
||||
%write p6 header
|
||||
writeln(Output, 'P6'),
|
||||
atomic_list_concat([X, Y], ' ', Dimensions),
|
||||
writeln(Output, Dimensions),
|
||||
writeln(Output, '255'),
|
||||
%write bytes
|
||||
maplist(maplist(maplist(put_byte(Output))),Pixels),
|
||||
close(Output).
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
:- use_module(bitmapIO).
|
||||
|
||||
write :-
|
||||
new_bitmap(AllBlack,[50,50],[0,0,0]),
|
||||
set_pixel0(AlmostAllBlack,AllBlack,[25,25],[255,255,255]),
|
||||
write_ppm_p6('AlmostAllBlack.ppm',AlmostAllBlack).
|
||||
new_bitmap(AllBlack,[50,50],[0,0,0]),
|
||||
set_pixel0(AlmostAllBlack,AllBlack,[25,25],[255,255,255]),
|
||||
write_ppm_p6('AlmostAllBlack.ppm',AlmostAllBlack).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue