Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can images be read from a file into an array?
#7
(02-17-2023, 01:53 AM)PhilOfPerth Wrote: Dim Image(10) As Long
Image(0) = _LoadImage("RecPics/cat.jpg", 32)
Image(1) = _LoadImage("RecPics/cat.jpg", 32)
Image(2) = _LoadImage("RecPics/cat.jpg", 32)
Image(3) = _LoadImage("RecPics/cat.jpg", 32)
Image(4) = _LoadImage("RecPics/cat.jpg", 32)
_PutImage (0, 0), Image(2)
Sleep
_FreeImage (Image(2))

I get an "Illegal function call" error on line 7 (the _PutImage line).
(I have the cat.jpg image in a folder called RecPicS)


I noticed you referenced RecPics/cat in the sample code above but then said your folder was RecPicS (note the capital S at the end). Probably a typo but pointing it out just in case.
And depending on how your program is structured you might have to use DIM SHARED Image(10) AS LONG for it to work properly
Reply


Messages In This Thread
RE: Can images be read from a file into an array? - by 40wattstudio - 02-17-2023, 02:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Has anybody experience with MODBUS to read temp sensors? Rudy M 28 1,668 02-27-2026, 04:21 PM
Last Post: Rudy M
  about Hardware Images and _DisplayOrder,Help! qbfans 11 574 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 498 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 477 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 739 09-22-2025, 11:12 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)