File tree 2 files changed +37
-1
lines changed
2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ INLINE REBCNT ARGB_To_BGR(REBCNT i)
637
637
if ((w = Valid_Tuples (block ))) Trap_Arg (block + w - 1 );
638
638
Tuples_To_RGBA (ip , size , VAL_BLK_DATA (block ), VAL_LEN (block ));
639
639
}
640
- else if (!IS_END (block )) return 0 ;
640
+ if (!IS_END (block )) return 0 ;
641
641
642
642
//if (!IS_END(block)) Trap_Arg(block);
643
643
Original file line number Diff line number Diff line change @@ -22,6 +22,42 @@ Rebol [
22
22
--assert-er try [image? to image! make gob! []]
23
23
===end-group===
24
24
25
+ ===start-group=== "construct image"
26
+ --test-- "construct image valid"
27
+ --assert "make image! [1x1 #{FFFFFF}]" = mold #[image! 1x1 ]
28
+ --assert "make image! [1x1 #{FFFFFF}]" = mold #[image! 1x1 #{ FFFFFF } ]
29
+ --assert "make image! [1x1 #{FFFFFF}]" = mold #[image! 1x1 #{ FF } ]
30
+ --assert "make image! [1x1 #{141414}]" = mold #[image! 1x1 20.20.20]
31
+ --assert "make image! [1x1 #{141414} #{3C}]" = mold #[image! 1x1 20.20.20.60]
32
+ --assert all [
33
+ "make image! [1x1 #{FFFFFF} #{30}]" = mold img: #[image! 1x1 #{ FFFFFF } #{ 30 } ]
34
+ #{ 30 } = img/alpha
35
+ #{ FFFFFF } = img/rgb
36
+ #{ FFFFFF30 } = img/rgba
37
+ ]
38
+ --assert all [
39
+ "make image! [1x1 #{}]" = mold img: #[image! 1x1 #{ FFFFFF } 2 ]
40
+ 2 = index? img
41
+ #{} = img/alpha
42
+ #{} = img/rgba
43
+ img: head img
44
+ "make image! [1x1 #{FFFFFF}]" = mold img
45
+ #{ FF } = img/alpha
46
+ #{ FFFFFFFF } = img/rgba
47
+ ]
48
+ --test-- "construct image invalid"
49
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/1034
50
+ --assert error? try [load {#[image!]} ]
51
+ --assert error? try [load {#[image! x]} ]
52
+ --assert error? try [load {#[image! 1x-1]} ]
53
+ --assert error? try [load {#[image! 1x1 x]} ]
54
+ --assert error? try [load {#[image! 1x1 #{FF} x]} ]
55
+ --assert error? try [load {#[image! 1x1 20.20.20.60 x]} ]
56
+ --assert error? try [load {#[image! 1x1 #{FFFFFF} #{30} x]} ]
57
+
58
+
59
+ ===end-group===
60
+
25
61
===start-group=== "FOREACH"
26
62
--test-- "issue-1479"
27
63
;@@ https://github.com/Oldes/Rebol-issues/issues/1479
You can’t perform that action at this time.
0 commit comments