diff --git a/vlib/stbi/stbi.c.v b/vlib/stbi/stbi.c.v index 66ece19dc9..72bf010727 100644 --- a/vlib/stbi/stbi.c.v +++ b/vlib/stbi/stbi.c.v @@ -42,7 +42,7 @@ pub mut: height int nr_channels int ok bool - data voidptr + data &u8 = unsafe { nil } ext string } @@ -124,7 +124,6 @@ pub fn load(path string, params LoadParams) !Image { mut res := Image{ ok: true ext: ext - data: 0 } res.data = C.stbi_load(&char(path.str), &res.width, &res.height, &res.nr_channels, params.desired_channels) @@ -139,7 +138,6 @@ pub fn load(path string, params LoadParams) !Image { pub fn load_from_memory(buf &u8, bufsize int, params LoadParams) !Image { mut res := Image{ ok: true - data: 0 } res.data = C.stbi_load_from_memory(buf, bufsize, &res.width, &res.height, &res.nr_channels, params.desired_channels) @@ -162,7 +160,6 @@ pub fn resize_uint8(img &Image, output_w int, output_h int) !Image { mut res := Image{ ok: true ext: img.ext - data: 0 width: output_w height: output_h nr_channels: img.nr_channels