File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,10 @@ INLINE REBCNT ARGB_To_BGR(REBCNT i)
477
477
Append_Byte (mold -> series , '}' );
478
478
return ;
479
479
}
480
+
481
+ // use `flat` result for images with less than 10 pixels (looks better in console)
482
+ if (size < 10 ) indented = FALSE;
483
+
480
484
data = (REBCNT * )VAL_IMAGE_DATA (value );
481
485
up = Prep_Uni_Series (mold , indented ? ((size * 6 ) + ((size - 1 ) / 10 ) + 1 ) : (size * 6 ));
482
486
Original file line number Diff line number Diff line change @@ -291,12 +291,16 @@ Rebol [
291
291
--assert "make image! [10x0 #{}]" = mold make image! 10x0
292
292
--assert "make image! [0x10 #{}]" = mold make image! 0x10
293
293
294
+ --test-- "mold small image"
295
+ ;@@ https://github.com/Oldes/Rebol3/issues/13
296
+ --assert (mold make image! 2x2 ) = {make image! [2x2 #{FFFFFFFFFFFFFFFFFFFFFFFF} ]}
297
+
294
298
--test-- "mold/flat image!"
295
299
;@@ https://github.com/rebol/rebol-issues/issues/2389
296
300
--assert (mold /flat make image! 8x1 ) = {make image! [8x1 #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} ]}
297
301
--assert (mold /flat make image! 8x2 ) = {make image! [8x2 #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} ]}
298
302
--assert (mold /flat make image! [1x1 0.0.0.66]) = {make image! [1x1 #{000000} #{42} ]}
299
-
303
+
300
304
--test-- "mold/flat/all image!"
301
305
--assert (mold /all/flat make image! 8x1 ) = {#[image! 8x1 #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} ]}
302
306
--assert (mold /all/flat next make image! 8x1 ) = {#[image! 8x1 #{FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF} 2]}
You can’t perform that action at this time.
0 commit comments