|
Forum Index : Microcontroller and PC projects : MMBasic: soliciting syntax suggestions for fun/cmd to read image size
| Author | Message | ||||
| thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4380 |
Hi folks, I find myself wanting to add support to MMB4L to get the width and height of an image file - png in particular. I have two ideas for syntax, either a function: size% = MM.INFO(IMAGE SIZE filename$) Which returns width and height in the lower and upper words respectively of the 64-bit size% variable. Or a command: IMAGE GETSIZE filename$, width%, height% Where width% and height% are filled on return (act as pass by reference variables) - I have used the same pattern previously due the CONSOLE GETSIZE command. In both cases I was proposing to determine the image type from the file extension. Any suggestions? Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
| EDNEDN Guru Joined: 18/02/2023 Location: United StatesPosts: 303 |
MM.Info() would be a more natural and consistent fit in my opinion. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |