Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nth problem with hardware images
#1
I know, I know. The problem is ME; I'm a complete idiot trying to understand hardware images... 
Why isn't something as simple as this working? What on earth am I doing wrong? My apologies to everyone, and thank you for your patience Sad

Code: (Select All)
Option _Explicit
Randomize Timer

Dim As Long hardwareScreen, workScreen, Nave, Fondo, i

Screen _NewImage(1920, 1080, 32)
_FullScreen , _Smooth

workScreen = _NewImage(1920, 1080, 32)
Fondo = _LoadImage("C:\STRC\Espacio\3.jpg")
Nave = _LoadImage("C:\STRC\Naves\Constitution2\nave.png")

_PutImage (0, 0)-Step(1920, 1080), Fondo, workScreen

For i = 1 To 100
    _PutImage (Rnd * 1920, Rnd * 1080), Nave, workScreen
Next

hardwareScreen = _CopyImage(workScreen, 33)

_Dest 0
_DisplayOrder _Hardware

_PutImage (0, 0), hardwareScreen
_Display
End
10 PRINT "Hola! Smile"
20 GOTO 10
Reply
#2
@Ikerkaz 

You're doing absolutely nothing wrong.  It works 100% as designed.   (Which unfortunately isn't how you intended. Tongue )

Code: (Select All)
Option _Explicit
Randomize Timer

Dim As Long hardwareScreen, workScreen, Nave, Fondo, i

Screen _NewImage(1920, 1080, 32)
_FullScreen , _Smooth

workScreen = _NewImage(1920, 1080, 32)
Fondo = _LoadImage("Z:\Jan 2026.png")
Nave = _LoadImage("Z:\steve1973.gif")

_PutImage (0, 0)-Step(1920, 1080), Fondo, workScreen

For i = 1 To 100
_PutImage (Rnd * 1920, Rnd * 1080), Nave, workScreen
Next

hardwareScreen = _CopyImage(workScreen, 33)

_Dest 0
_DisplayOrder _Hardware

Do
_PutImage (0, 0), hardwareScreen
_Display
_Limit 30
Loop Until _KeyHit

End

The issue? You're putting it on a hardware screen, which *WORKS*. It's displaying properly without any issues whatsoever.

So why are you seeing nothing?

Because the program then ENDs and swaps to a software screen to say "Press Any Key to Continue." <-- This erases that hardware screen.

See the only change made above to make it work? (Not counting file names so it would find test images to run on my machine?)

I just made it look for a keypress before ending, so you could see the display. Press a key and then you can see that END screen and where it's erasing your image from displaying.

Put it in a DO...LOOP like I have, with a nice limit, and then drop to SYSTEM when done and you won't have this type display error making it seem like you messed up when you didn't.
Reply
#3
Steve The Amazing is always correct, of course.

Fondo = _LoadImage("Z:\Jan 2026.png")
Nave = _LoadImage("Z:\steve1973.gif")

But I thought that loading from a harddisk image file, you had to state the type of image as:
Fondo = _LoadImage("Z:\Jan 2026.png",32)
Nave = _LoadImage("Z:\steve1973.gif",32)

or ,33 or ,256 or some such.

Is that not necessary?
Reply
#4
(01-22-2026, 05:52 PM)Magdha Wrote: Steve The Amazing is always correct, of course.

Fondo = _LoadImage("Z:\Jan 2026.png")
Nave = _LoadImage("Z:\steve1973.gif")

But I thought that loading from a harddisk image file, you had to state the type of image as:
Fondo = _LoadImage("Z:\Jan 2026.png",32)
Nave = _LoadImage("Z:\steve1973.gif",32)

or ,33 or ,256 or some such.

Is that not necessary?

Adding that makes it convert to that format for you automagically.  Without it, it loads based on the current screen.

As per the wiki: The mode& parameter can be 32, 33, 256, or 257. Omit to use the current graphic screen settings.
Reply
#5
@Steve, it's not working for me. The first time I tried, the screen was chaotic, but the images were briefly displayed for half a second. From the second attempt onward, it was just a black screen. I had to abort always  with Ctrl+C.

The two images:

[Image: BMW-Einzylinder-1964.jpg]

[Image: Honda-c77-1967.jpg]
Reply
#6
(01-22-2026, 05:40 PM)SMcNeill Wrote: @Ikerkaz 

You're doing absolutely nothing wrong.  It works 100% as designed.   (Which unfortunately isn't how you intended. Tongue )

The issue?  You're putting it on a hardware screen, which *WORKS*.  It's displaying properly without any issues whatsoever.

So why are you seeing nothing?

Because the program then ENDs and swaps to a software screen to say "Press Any Key to Continue."  <-- This erases that hardware screen.

See the only change made above to make it work?  (Not counting file names so it would find test images to run on my machine?) 

I just made it look for a keypress before ending, so you could see the display.  Press a key and then you can see that END screen and where it's erasing your image from displaying.

Put it in a DO...LOOP like I have, with a nice limit, and then drop to SYSTEM when done and you won't have this type display error making it seem like you messed up when you didn't.

Now I have a VERY BIG FACEPALM in my head... THANK YOU THANK YOU THANK YOU I LOVE YOU @SMcNeill Heart
10 PRINT "Hola! Smile"
20 GOTO 10
Reply
#7
Awww heck.  That’s nothing unusual.  I LOVE ME, TOO!!  Big Grin
Reply
#8
Does the board come with included janitorial service?... Because I just totally threw up on isle #7.

@Ikerkaz Have a look at some of the fun stuff you can do with hardware acceleration in screen 0. Eventually I'll merge my buttons routine into it, but for now, 5 kinds of nice drop down or popup menus.

https://qb64phoenix.com/forum/showthread...7#pid39147

Pete Big Grin
Reply
#9
(01-23-2026, 02:08 AM)Pete Wrote: Does the board come with included janitorial service?... Because I just totally threw up on isle #7.

@Ikerkaz Have a look at some of the fun stuff you can do with hardware acceleration in screen 0. Eventually I'll merge my buttons routine into it, but for now, 5 kinds of nice drop down or popup menus.

https://qb64phoenix.com/forum/showthread...7#pid39147

Pete Big Grin
I'll take a look Pete, thanks !!!  Tongue
10 PRINT "Hola! Smile"
20 GOTO 10
Reply
#10
On the job!
   
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 541 02-11-2026, 07:10 AM
Last Post: SMcNeill
  I'm looking for suggestions to solve the problem! Petr 10 649 02-05-2026, 04:56 PM
Last Post: ahenry3068
  Install problem...... jssantoro 6 380 12-17-2025, 08:31 PM
Last Post: madscijr
  Hardware images questions Dav 5 462 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 723 09-22-2025, 11:12 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)