Handbook
Glossary
detect-colorspace ( jpeg-image -- csp )
Vocabulary
images
.
jpeg
.
private
Inputs
jpeg-image
an
object
Outputs
csp
an
object
Definition
USING:
accessors
kernel
sequences
;
IN:
images.jpeg.private
::
detect-colorspace
( jpeg-image -- csp )
jpeg-image
color-info>>
sift
:>
colors
MAGIC!
colors
length
1
=
[
drop
Y
]
when
colors
length
3
=
[
colors
[
mb-dim
{
1 1
}
=
]
all?
[
drop
YUV444
]
when
colors
unclip
[
[
mb-dim
{
1 1
}
=
]
all?
]
[
mb-dim
{
2 2
}
=
]
bi*
and
[
drop
YUV420
]
when
]
when
;