28 lines
459 B
C
28 lines
459 B
C
|
#include <graph.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
|
||
|
int main(int argc, char const *argv[])
|
||
|
{
|
||
|
FILE *f;
|
||
|
f=fopen("image.bin","r");
|
||
|
int x;
|
||
|
int y;
|
||
|
couleur c;
|
||
|
fread(&x,sizeof(int),1,f);
|
||
|
fread(&y,sizeof(int),1,f);
|
||
|
InitialiserGraphique();
|
||
|
CreerFenetre(10,10,x,y);
|
||
|
for(int i=0;i<x;i++)
|
||
|
{
|
||
|
for(int j=0;j<y;j++)
|
||
|
{
|
||
|
fread(&c,sizeof(unsigned long int),1,f);
|
||
|
ChoisirCouleurDessin(c);
|
||
|
DessinerPixel(i,j);
|
||
|
}
|
||
|
}
|
||
|
Touche();
|
||
|
FermerGraphique();
|
||
|
}
|