mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #4025 from karl-zylinski/patch-2
core/image/common.odin compile fix
This commit is contained in:
@@ -590,7 +590,7 @@ Channel :: enum u8 {
|
|||||||
|
|
||||||
// Take a slice of pixels (`[]RGBA_Pixel`, etc), and return an `Image`
|
// Take a slice of pixels (`[]RGBA_Pixel`, etc), and return an `Image`
|
||||||
// Don't call `destroy` on the resulting `Image`. Instead, delete the original `pixels` slice.
|
// Don't call `destroy` on the resulting `Image`. Instead, delete the original `pixels` slice.
|
||||||
pixels_to_image :: proc(pixels: [][$N]$E, width: int, height: int) -> (img: Image, ok: bool) where E == u8 || E == u16, N >= 1 && N <= 4 {
|
pixels_to_image :: proc(pixels: [][$N]$E, width: int, height: int) -> (img: Image, ok: bool) where E == u8 || E == u16, N >= 1, N <= 4 {
|
||||||
if len(pixels) != width * height {
|
if len(pixels) != width * height {
|
||||||
return {}, false
|
return {}, false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user