version	U12.1.00
uid	rawimage.u1-1787877242-0
impl	error
link	wopen.u
global	2
	0,000005,WriteRaw,5
	1,000005,ReadRaw,4

proc WriteRaw
	local	0,001000,win
	local	1,001000,x
	local	2,001000,y
	local	3,001000,w
	local	4,001000,h
	local	5,000020,nextid
	local	6,000020,palette
	local	7,000020,line
	local	8,000020,c
	local	9,000020,temp
	local	10,000020,tempname
	local	11,000000,type
	local	12,000000,WAttrib
	local	13,000000,map
	local	14,000000,open
	local	15,000000,stop
	local	16,000000,table
	local	17,000000,Pixel
	local	18,000000,write
	local	19,000000,move
	local	20,000000,tab
	local	21,000000,sort
	local	22,000000,get
	local	23,000000,close
	local	24,000000,writes
	local	25,000000,reads
	local	26,000000,remove
	con	0,010000,6,167,151,156,144,157,167
	con	1,010000,5,167,151,144,164,150
	con	2,010000,6,150,145,151,147,150,164
	con	3,002000,1,0
	con	4,010000,9,057,164,155,160,057,162,145,147,056
	con	5,010000,6,155,155,150,150,163,163
	con	6,010000,8,155,155,072,150,150,072,163,163
	con	7,010000,1,167
	con	8,010000,30,052,052,052,040,143,141,156,156,157,164,040,157,160,145,156,040,164,145,155,160,157,162,141,162,171,040,146,151,154,145
	con	9,010000,0
	con	10,010000,16,060,061,062,063,064,065,066,067,070,071,141,142,143,144,145,146
	con	11,002000,2,64
	con	12,010000,1,054
	con	13,002000,1,4
	con	14,010000,1,040
	con	15,010000,30,052,052,052,040,143,141,156,156,157,164,040,146,151,156,144,040,164,145,155,160,157,162,141,162,171,040,146,151,154,145
	con	16,002000,5,10000
	declend
	filen	rawimage.icn
	line	42
	colm	11
	synt	any
	mark	L1
	line	45
	colm	4
	synt	if
	mark0
	pnull
	var	11
	var	0
	line	45
	colm	11
	synt	any
	invoke	1
	str	0
	line	45
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	pnull
	var	2
	pnull
	var	3
	var	4
	line	46
	colm	29
	synt	any
	swap
	line	46
	colm	23
	synt	any
	swap
	line	46
	colm	17
	synt	any
	swap
	line	46
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	47
	colm	14
	synt	any
	keywd	window
	line	47
	colm	11
	synt	any
	asgn
	line	45
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	pnull
	var	3
	line	50
	colm	4
	synt	any
	null
	var	12
	var	0
	str	1
	line	50
	colm	17
	synt	any
	invoke	2
	line	50
	colm	7
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	pnull
	var	4
	line	51
	colm	4
	synt	any
	null
	var	12
	var	0
	str	2
	line	51
	colm	17
	synt	any
	invoke	2
	line	51
	colm	7
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	1
	line	52
	colm	4
	synt	any
	null
	int	3
	line	52
	colm	7
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	2
	line	53
	colm	4
	synt	any
	null
	int	3
	line	53
	colm	7
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	10
	pnull
	str	4
	var	13
	str	5
	str	6
	line	55
	colm	57
	synt	any
	keywd	clock
	line	55
	colm	34
	synt	any
	invoke	3
	line	55
	colm	28
	synt	any
	cat
	line	55
	colm	13
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	pnull
	var	9
	mark	L9
	var	14
	var	10
	str	7
	line	56
	colm	16
	synt	any
	invoke	2
	line	56
	colm	32
	synt	any
	esusp
	goto	L10
lab L9
	var	15
	str	8
	line	56
	colm	38
	synt	any
	invoke	1
lab L10
	line	56
	colm	9
	synt	any
	asgn
	unmark
lab L8
	mark	L11
	pnull
	var	7
	str	9
	line	59
	colm	9
	synt	any
	asgn
	unmark
lab L11
	mark	L12
	pnull
	var	6
	var	16
	line	61
	colm	20
	synt	any
	invoke	0
	line	61
	colm	12
	synt	any
	asgn
	unmark
lab L12
	mark	L13
	pnull
	var	5
	goto	L16
lab L14
	pop
	mark	L15
	pnull
	pnull
	str	10
	line	63
	colm	21
	synt	any
	bang
	pnull
	str	10
	line	63
	colm	44
	synt	any
	bang
	line	63
	colm	41
	synt	any
	cat
	line	63
	colm	14
	synt	any
	coret
	efail
lab L15
	cofail
	goto	L15
lab L16
	create	L14
	line	63
	colm	11
	synt	any
	asgn
	unmark
lab L13
	mark	L17
	line	65
	colm	4
	synt	every
	mark0
	pnull
	var	8
	var	17
	var	0
	var	1
	var	2
	var	3
	var	4
	line	65
	colm	20
	synt	any
	invoke	5
	line	65
	colm	12
	synt	any
	asgn
	pop
	mark0
	mark	L20
	pnull
	pnull
	pnull
	var	6
	var	8
	line	66
	colm	15
	synt	any
	subsc
	line	66
	colm	7
	synt	any
	null
	pnull
	var	5
	line	66
	colm	22
	synt	any
	coact
	line	66
	colm	19
	synt	any
	asgn
	unmark
lab L20
	mark	L21
	pnull
	var	7
	dup
	pnull
	var	6
	var	8
	line	67
	colm	24
	synt	any
	subsc
	line	67
	colm	12
	synt	any
	cat
	asgn
	unmark
lab L21
	pnull
	var	7
	sdup
	line	68
	colm	12
	synt	any
	bscan
	var	18
	var	9
	var	19
	int	11
	line	69
	colm	26
	synt	any
	invoke	1
	line	69
	colm	15
	synt	any
	invoke	2
	pop
	var	20
	int	3
	line	69
	colm	37
	synt	any
	invoke	1
	line	68
	colm	12
	synt	any
	escan
	asgn
	unmark
lab L18
	efail
lab L19
	line	65
	colm	4
	synt	endevery
	unmark
lab L17
	mark	L22
	var	18
	var	9
	pnull
	str	9
	var	7
	line	73
	colm	19
	synt	any
	lexne
	line	73
	colm	9
	synt	any
	invoke	2
	unmark
lab L22
	mark	L23
	var	18
	var	3
	str	12
	var	4
	line	75
	colm	9
	synt	any
	invoke	3
	unmark
lab L23
	mark	L24
	pnull
	var	6
	var	21
	var	6
	int	13
	line	77
	colm	19
	synt	any
	invoke	2
	line	77
	colm	12
	synt	any
	asgn
	unmark
lab L24
	mark	L25
lab L26
	line	79
	colm	4
	synt	while
	mark0
	pnull
	var	8
	var	22
	var	6
	line	79
	colm	18
	synt	any
	invoke	1
	line	79
	colm	12
	synt	any
	asgn
	unmark
	mark	L26
	var	18
	var	22
	var	6
	line	80
	colm	16
	synt	any
	invoke	1
	str	14
	var	8
	line	80
	colm	12
	synt	any
	invoke	3
lab L27
	unmark
	goto	L26
lab L28
	line	79
	colm	4
	synt	endwhile
	unmark
lab L25
	mark	L29
	var	18
	line	82
	colm	9
	synt	any
	invoke	0
	unmark
lab L29
	mark	L30
	var	23
	var	9
	line	84
	colm	9
	synt	any
	invoke	1
	unmark
lab L30
	mark	L31
	pnull
	var	9
	mark	L32
	var	14
	var	10
	line	85
	colm	16
	synt	any
	invoke	1
	line	85
	colm	27
	synt	any
	esusp
	goto	L33
lab L32
	var	15
	str	15
	line	85
	colm	33
	synt	any
	invoke	1
lab L33
	line	85
	colm	9
	synt	any
	asgn
	unmark
lab L31
	mark	L34
lab L35
	line	87
	colm	4
	synt	while
	mark0
	var	24
	var	25
	var	9
	int	16
	line	87
	colm	22
	synt	any
	invoke	2
	line	87
	colm	16
	synt	any
	invoke	1
lab L36
	unmark
	goto	L35
lab L37
	line	87
	colm	4
	synt	endwhile
	unmark
lab L34
	mark	L38
	var	23
	var	9
	line	89
	colm	9
	synt	any
	invoke	1
	unmark
lab L38
	mark	L39
	var	26
	var	10
	line	90
	colm	10
	synt	any
	invoke	1
	unmark
lab L39
	mark	L40
	mark	L41
	pnull
	line	92
	colm	4
	synt	any
	pret
lab L41
	synt	any
	pfail
	unmark
lab L40
	pnull
	line	94
	colm	1
	synt	any
	pfail
	end
proc ReadRaw
	local	0,001000,win
	local	1,001000,s
	local	2,001000,x
	local	3,001000,y
	local	4,000020,input
	local	5,000020,palette
	local	6,000020,c
	local	7,000020,temp
	local	8,000020,size
	local	9,000020,width
	local	10,000020,height
	local	11,000020,line
	local	12,000000,type
	local	13,000000,open
	local	14,000000,stop
	local	15,000000,WOpen
	local	16,000000,read
	local	17,000000,integer
	local	18,000000,tab
	local	19,000000,upto
	local	20,000000,move
	local	21,000000,table
	local	22,000000,Fg
	local	23,000000,DrawPoint
	local	24,000000,CopyArea
	con	0,010000,6,167,151,156,144,157,167
	con	1,010000,30,052,052,052,040,143,141,156,156,157,164,040,162,145,141,144,040,162,141,167,040,151,155,141,147,145,040,146,151,154,145
	con	2,010000,5,163,151,172,145,075
	con	3,010000,13,143,141,156,166,141,163,075,150,151,144,144,145,156
	con	4,010000,28,052,052,052,040,155,141,154,146,157,162,155,145,144,040,162,141,167,040,151,155,141,147,145,040,146,151,154,145
	con	5,020000,1,054
	con	6,002000,1,1
	con	7,002000,1,0
	con	8,010000,24,151,156,166,141,154,151,144,040,162,141,167,040,151,155,141,147,145,040,150,145,141,144,145,162
	con	9,002000,1,2
	con	10,010000,18,052,052,052,151,156,166,141,154,151,144,040,143,157,154,157,162,072,040
	declend
	line	96
	colm	11
	synt	any
	mark	L1
	line	99
	colm	4
	synt	if
	mark0
	pnull
	var	12
	var	0
	line	99
	colm	11
	synt	any
	invoke	1
	str	0
	line	99
	colm	17
	synt	any
	lexne
	unmark
	mark	L2
	pnull
	var	0
	pnull
	var	1
	pnull
	var	2
	var	3
	line	100
	colm	23
	synt	any
	swap
	line	100
	colm	17
	synt	any
	swap
	line	100
	colm	11
	synt	any
	swap
	unmark
lab L2
	pnull
	var	0
	line	101
	colm	14
	synt	any
	keywd	window
	line	101
	colm	11
	synt	any
	asgn
	line	99
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	var	4
	mark	L4
	var	13
	var	1
	line	104
	colm	17
	synt	any
	invoke	1
	line	104
	colm	21
	synt	any
	esusp
	goto	L5
lab L4
	var	14
	str	1
	line	104
	colm	27
	synt	any
	invoke	1
lab L5
	line	104
	colm	10
	synt	any
	asgn
	unmark
lab L3
	mark	L6
	pnull
	var	7
	mark	L7
	var	15
	pnull
	str	2
	pnull
	var	8
	var	16
	var	4
	line	106
	colm	42
	synt	any
	invoke	1
	line	106
	colm	35
	synt	any
	asgn
	line	106
	colm	26
	synt	any
	cat
	str	3
	line	106
	colm	17
	synt	any
	invoke	2
	line	106
	colm	69
	synt	any
	esusp
	goto	L8
lab L7
	var	14
	str	4
	line	107
	colm	11
	synt	any
	invoke	1
lab L8
	line	106
	colm	9
	synt	any
	asgn
	unmark
lab L6
	mark	L9
	var	8
	line	109
	colm	9
	synt	any
	bscan
	pnull
	var	9
	var	17
	var	18
	var	19
	cset	5
	line	110
	colm	32
	synt	any
	invoke	1
	line	110
	colm	27
	synt	any
	invoke	1
	line	110
	colm	23
	synt	any
	invoke	1
	line	110
	colm	13
	synt	any
	asgn
	pop
	var	20
	int	6
	line	111
	colm	11
	synt	any
	invoke	1
	pop
	pnull
	var	10
	mark	L10
	var	17
	var	18
	int	7
	line	112
	colm	28
	synt	any
	invoke	1
	line	112
	colm	24
	synt	any
	invoke	1
	line	112
	colm	33
	synt	any
	esusp
	goto	L11
lab L10
	var	14
	str	8
	line	112
	colm	39
	synt	any
	invoke	1
lab L11
	line	112
	colm	14
	synt	any
	asgn
	line	109
	colm	9
	synt	any
	escan
	unmark
lab L9
	mark	L12
	pnull
	var	5
	var	21
	line	115
	colm	20
	synt	any
	invoke	0
	line	115
	colm	12
	synt	any
	asgn
	unmark
lab L12
	mark	L13
lab L14
	line	117
	colm	4
	synt	while
	mark0
	pnull
	var	11
	var	16
	var	4
	line	117
	colm	22
	synt	any
	invoke	1
	line	117
	colm	15
	synt	any
	asgn
	unmark
	mark	L14
	var	11
	line	118
	colm	12
	synt	any
	bscan
	pnull
	pnull
	var	5
	mark	L17
	var	20
	int	9
	line	119
	colm	22
	synt	any
	invoke	1
	line	119
	colm	26
	synt	any
	esusp
	goto	L18
lab L17
	unmark
	pnull
	goto	L16
lab L18
	line	119
	colm	17
	synt	any
	subsc
	pushn1
	var	20
	int	6
	line	119
	colm	43
	synt	any
	invoke	1
	var	18
	int	7
	line	119
	colm	51
	synt	any
	invoke	1
	line	119
	colm	38
	synt	any
	invoke	2
	line	119
	colm	35
	synt	any
	asgn
	line	118
	colm	12
	synt	any
	escan
lab L15
	unmark
	goto	L14
lab L16
	line	117
	colm	4
	synt	endwhile
	unmark
lab L13
	mark	L19
	pnull
	var	2
	pnull
	var	3
	int	7
	line	122
	colm	11
	synt	any
	asgn
	line	122
	colm	6
	synt	any
	asgn
	unmark
lab L19
	mark	L20
lab L21
	line	124
	colm	4
	synt	repeat
	mark	L21
	mark	L24
	pnull
	var	11
	mark	L25
	var	16
	var	4
	line	125
	colm	19
	synt	any
	invoke	1
	line	125
	colm	27
	synt	any
	esusp
	goto	L26
lab L25
	unmark
	unmark
	pnull
	goto	L23
lab L26
	line	125
	colm	12
	synt	any
	asgn
	unmark
lab L24
	var	11
	line	126
	colm	12
	synt	any
	bscan
lab L27
	line	127
	colm	10
	synt	while
	mark0
	pnull
	var	6
	var	20
	int	9
	line	127
	colm	25
	synt	any
	invoke	1
	line	127
	colm	18
	synt	any
	asgn
	unmark
	mark	L27
	mark	L30
	mark	L31
	var	22
	var	7
	pnull
	var	5
	var	6
	line	128
	colm	29
	synt	any
	subsc
	line	128
	colm	15
	synt	any
	invoke	2
	line	128
	colm	34
	synt	any
	esusp
	goto	L32
lab L31
	var	14
	str	10
	var	6
	line	128
	colm	40
	synt	any
	invoke	2
lab L32
	unmark
lab L30
	mark	L33
	var	23
	var	7
	var	2
	var	3
	line	129
	colm	22
	synt	any
	invoke	3
	unmark
lab L33
	mark	L34
	pnull
	var	2
	dup
	int	6
	line	130
	colm	15
	synt	any
	plus
	asgn
	unmark
lab L34
	line	131
	colm	13
	synt	if
	mark0
	pnull
	var	2
	var	9
	line	131
	colm	18
	synt	any
	numeq
	unmark
	mark	L35
	pnull
	var	2
	int	7
	line	132
	colm	18
	synt	any
	asgn
	unmark
lab L35
	pnull
	var	3
	dup
	int	6
	line	133
	colm	18
	synt	any
	plus
	asgn
	line	131
	colm	13
	synt	endif
lab L28
	unmark
	goto	L27
lab L29
	line	127
	colm	10
	synt	endwhile
	line	126
	colm	12
	synt	any
	escan
lab L22
	unmark
	goto	L21
lab L23
	line	124
	colm	4
	synt	endrepeat
	unmark
lab L20
	mark	L36
	var	24
	var	7
	var	0
	int	7
	int	7
	var	9
	var	10
	var	2
	var	3
	line	139
	colm	12
	synt	any
	invoke	8
	unmark
lab L36
	mark	L37
	mark	L38
	pnull
	line	141
	colm	4
	synt	any
	pret
lab L38
	synt	any
	pfail
	unmark
lab L37
	pnull
	line	143
	colm	1
	synt	any
	pfail
	end
