MoonBit image: simple image representation.
Dependencies
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.$ moon version --all
moon 0.1.20260803 (c19f78e 2026-08-03) ~/.moon/bin/moon
moonc v0.10.6+80dc50f24 (2026-08-04) ~/.moon/bin/moonc
moonrun 0.1.20260803 (c19f78e 2026-08-03) ~/.moon/bin/moonrun
pub(open) trait Image {
fn color_model(Self) -> &Model
fn bounds(Self) -> Rectangle
fn at(Self, Int, Int) -> &Color
fn opaque_(Self) -> Bool
fn set(Self, Int, Int, &Color) -> Unit
fn sub_image(Self, Rectangle) -> &Image
fn as_ycbcr(Self) -> YCbCr?
fn raw_data(Self) -> Slice[Byte]
fn get_bytes_per_pixel(Self) -> Int
fn get_stride(Self) -> Int
fn pix_offset(Self, Int, Int) -> Int
fn color_index_at(Self, Int, Int) -> Byte
}pub(all) struct YCbCr {
y : Slice[Byte]
cb : Slice[Byte]
cr : Slice[Byte]
y_stride : Int
c_stride : Int
subsampling : YCbCrSubsampling
rect : Rectangle
}pub(all) enum YCbCrSubsampling {
YCbCrSubsampling444
YCbCrSubsampling422
YCbCrSubsampling420
YCbCrSubsampling440
YCbCrSubsampling411
YCbCrSubsampling410
} derive(Eq)fn add2_non_neg(x : Int, y : Int) -> Intfn mul3_non_neg(x : Int, y : Int, z : Int) -> IntMoonBit image: simple image representation.
Dependencies