Hey Nick,
I've got some weird behavior here with loading and drawing a png...
You can run this code in immediate if you want...
Any idea what's going on?
and the image can be found here
https://imgur.com/F7Dq4X5
Seems odd....
On top of this, every time it draws it changes.. I used it on a map and every single time the map reloaded the image shifted slightly and if you redrew it many times it looked animated.
Is this caused by the png not being 8 bit or 24 bit or something? I converted a bmp to png on another conversion website and the image worked OK. I'd love to learn about why this one didn't work though..
I've got some weird behavior here with loading and drawing a png...
You can run this code in immediate if you want...
Any idea what's going on?
-- Create miniwindow
win_id = "myMiniWindow"
WindowCreate(win_id, 0, 0, 100, 100, 1, 1, 0xFFFFFF)
-- Load image into miniwindow
WindowLoadImage(win_id, "building", "worlds\plugins\images\building.png")
-- Get window dimensions
local win_width, win_height = WindowInfo(win_id, 14), WindowInfo(win_id, 15)
-- Draw image to fill the entire window
WindowDrawImage(win_id, "building", 0, 0, win_width, win_height, miniwin.image_stretch)
-- Display the miniwindow
WindowShow(win_id, true)
and the image can be found here
https://imgur.com/F7Dq4X5
Seems odd....
On top of this, every time it draws it changes.. I used it on a map and every single time the map reloaded the image shifted slightly and if you redrew it many times it looked animated.
Is this caused by the png not being 8 bit or 24 bit or something? I converted a bmp to png on another conversion website and the image worked OK. I'd love to learn about why this one didn't work though..