Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -0,0 +1,33 @@
|
|||
Dim As String imagen = "Lena.ppm"
|
||||
|
||||
Sub readPPM (fs As String)
|
||||
Dim As Integer x, y, ancho, alto
|
||||
Dim As String t, kolor
|
||||
Dim As Ubyte r, g, b
|
||||
|
||||
If Len(fs) = 0 Then Print "No PPM file name indicated.": Exit Sub
|
||||
|
||||
Dim As Long ff = Freefile
|
||||
Open fs For Binary As #ff
|
||||
If Err Then Print "File "; fs; " not found.": Exit Sub
|
||||
|
||||
Input #ff, t, ancho, alto, kolor
|
||||
|
||||
If t = "P6" Then
|
||||
Screenres ancho, alto, 32
|
||||
For y = 0 To alto - 1
|
||||
For x = 0 To ancho - 1
|
||||
Get #ff, , r
|
||||
Get #ff, , g
|
||||
Get #ff, , b
|
||||
Pset (x, y), Rgb(r, g, b)
|
||||
Next x
|
||||
Next y
|
||||
Close #ff
|
||||
Else
|
||||
Print "File is NOT PPM P6 type."
|
||||
End If
|
||||
End Sub
|
||||
|
||||
readPPM(imagen)
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue