diff options
| author | Benoit Jacquier <benoit.jacquier@gmail.com> | 2022-08-27 16:22:37 +0200 |
|---|---|---|
| committer | Benoit Jacquier <benoit.jacquier@gmail.com> | 2022-08-27 16:22:37 +0200 |
| commit | 4e5337412a4e46fb26250f8adf1d019ddd8366c7 (patch) | |
| tree | a49c22bd4c894a26ddf8da92c10894fb8e03383f /core/image/common.odin | |
| parent | 00f2e911a73e99b1283306272ff433984d90486c (diff) | |
| parent | c82d7d3d87c2dc77ce942b1cc450734baca3da14 (diff) | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'core/image/common.odin')
| -rw-r--r-- | core/image/common.odin | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/image/common.odin b/core/image/common.odin index beb3f93ee..a627fa68b 100644 --- a/core/image/common.odin +++ b/core/image/common.odin @@ -475,7 +475,7 @@ return_single_channel :: proc(img: ^Image, channel: Channel) -> (res: ^Image, ok } // Does the image have 1 or 2 channels, a valid bit depth (8 or 16), -// Is the pointer valid, are the dimenions valid? +// Is the pointer valid, are the dimensions valid? is_valid_grayscale_image :: proc(img: ^Image) -> (ok: bool) { // Were we actually given a valid image? if img == nil { @@ -495,7 +495,7 @@ is_valid_grayscale_image :: proc(img: ^Image) -> (ok: bool) { // This returns 0 if any of the inputs is zero. bytes_expected := compute_buffer_size(img.width, img.height, img.channels, img.depth) - // If the dimenions are invalid or the buffer size doesn't match the image characteristics, bail. + // If the dimensions are invalid or the buffer size doesn't match the image characteristics, bail. if bytes_expected == 0 || bytes_expected != len(img.pixels.buf) || img.width * img.height > MAX_DIMENSIONS { return false } @@ -504,7 +504,7 @@ is_valid_grayscale_image :: proc(img: ^Image) -> (ok: bool) { } // Does the image have 3 or 4 channels, a valid bit depth (8 or 16), -// Is the pointer valid, are the dimenions valid? +// Is the pointer valid, are the dimensions valid? is_valid_color_image :: proc(img: ^Image) -> (ok: bool) { // Were we actually given a valid image? if img == nil { @@ -524,7 +524,7 @@ is_valid_color_image :: proc(img: ^Image) -> (ok: bool) { // This returns 0 if any of the inputs is zero. bytes_expected := compute_buffer_size(img.width, img.height, img.channels, img.depth) - // If the dimenions are invalid or the buffer size doesn't match the image characteristics, bail. + // If the dimensions are invalid or the buffer size doesn't match the image characteristics, bail. if bytes_expected == 0 || bytes_expected != len(img.pixels.buf) || img.width * img.height > MAX_DIMENSIONS { return false } @@ -533,7 +533,7 @@ is_valid_color_image :: proc(img: ^Image) -> (ok: bool) { } // Does the image have 1..4 channels, a valid bit depth (8 or 16), -// Is the pointer valid, are the dimenions valid? +// Is the pointer valid, are the dimensions valid? is_valid_image :: proc(img: ^Image) -> (ok: bool) { // Were we actually given a valid image? if img == nil { |