1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert "examples: fix viewer example (use the new stbi.load_from_memory_with_channels) (#16004)"

This reverts commit bce420c34d.
This commit is contained in:
Delyan Angelov 2022-10-10 11:37:26 +03:00
parent fa20d797a5
commit 2a4604b5f9
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -228,7 +228,7 @@ pub fn read_bytes_from_file(file_path string) []u8 {
fn (mut app App) load_texture_from_buffer(buf voidptr, buf_len int) (gfx.Image, int, int) {
// load image
stbi.set_flip_vertically_on_load(true)
img := stbi.load_from_memory_with_channels(buf, buf_len, 4) or {
img := stbi.load_from_memory(buf, buf_len) or {
eprintln('ERROR: Can not load image from buffer, file: [${app.item_list.lst[app.item_list.item_index]}].')
return app.logo_texture, app.logo_w, app.logo_h
// exit(1)