home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
subroutines
/
pic_dither.amos
/
pic_dither.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1978-01-04
|
821b
|
63 lines
' ******************
' *** PIC DITHER ***
' ******************
' *** This routine loads in a 32 colour lowres picture, then dithers it
' into 2 colours on a hires screen.
' *** Load IFF picture.
F$=Fsel$("","","LOAD IFF PICTURE")
If F$<>""
Load Iff F$,0
Else
Direct
End If
Screen Hide 0
' *** get picture info.
W=Screen Width-1
H=Screen Height-1
' *** Open work screen..
Screen Open 1,W*2,H*2,2,Hires+Laced
Palette $0,$FFF
Cls 0
' *** Dither picture.
For Y=0 To H
For X=0 To W
Screen 0
C=Point(X,Y)
C=Colour(C)/$111
Screen 1
Paste Icon X*2,Y*2,C+1
Next X
Next Y
' *** Close screen.
Screen Close 0
' *** Save picture.
F$=Fsel$("","","SAVE IFF PICTURE")
If F$<>""
Save Iff F$,0
Else
Direct
End If
' *** Quit.
Direct