diff --git a/basis/images/images.factor b/basis/images/images.factor index 4cea5f9f66..99f0bb91b9 100644 --- a/basis/images/images.factor +++ b/basis/images/images.factor @@ -66,11 +66,6 @@ TUPLE: image dim component-order component-type upside-down? bitmap ; : ( -- image ) image new ; inline -: ( -- image ) - - RGB >>component-order - ubyte-components >>component-type ; inline - : has-alpha? ( image -- ? ) component-order>> alpha-channel? ; : bytes-per-component ( component-type -- n ) diff --git a/extra/images/testing/testing.factor b/extra/images/testing/testing.factor index a6644ed710..4dd271aeef 100644 --- a/extra/images/testing/testing.factor +++ b/extra/images/testing/testing.factor @@ -1,9 +1,9 @@ ! Copyright (C) 2009 Keith Lazuka. ! See http://factorcode.org/license.txt for BSD license. -USING: fry images.loader images.normalization images.viewer io -io.directories io.encodings.binary io.files io.pathnames -io.streams.byte-array kernel locals namespaces quotations -sequences serialize tools.test io.backend ; +USING: accessors fry images images.loader images.normalization +images.viewer io io.backend io.directories io.encodings.binary +io.files io.pathnames io.streams.byte-array kernel locals +namespaces quotations random sequences serialize tools.test ; IN: images.testing [ '[ _ load-reference-image ] ] bi unit-test ] with-variable ; + +: ( -- image ) + + RGB >>component-order + ubyte-components >>component-type ; inline + +: randomize-image ( image -- image ) + dup bytes-per-image random-bytes >>bitmap ; \ No newline at end of file