Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Weird PNG drawing??
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Asmodeusbrooding
(22 posts) Bio
|
Date
| Wed 30 Aug 2023 11:58 PM (UTC) Amended on Thu 31 Aug 2023 12:21 AM (UTC) by Asmodeusbrooding
|
Message
| 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?
-- 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.. | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #1 on Thu 31 Aug 2023 10:33 AM (UTC) Amended on Thu 31 Aug 2023 10:35 AM (UTC) by Fiendish
|
Message
| |
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 02 Sep 2023 06:52 AM (UTC) |
Message
| That may well be the problem. If this is just one image try converting it to RGB with Gimp or some other program. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
3,876 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top