Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can anyone tell me why this won't compile?
#10
I figured everyone else already knew that.  I had just spent a good half hour trying to figure out why my images transparent color wasn't working.  The thing that confused me was that I somehow got it working that way by setting _Source, and reading a point off the image instead of using _RGB().  I managed to recreate it.  I'm storing the images in an array because that's how I did it last time. Don't know if that matters.

Code: (Select All)

''load iamges
Dim image&(1 to 2)
image&(1) = _LoadImage("blue1.png")
image&(2) = _LoadImage("blue1.bmp")

''get bg colors of images
Dim clr_png~&, clr_bmp~&
_Source image&(1)
clr_png~& = Point(0,0)
_Source image&(1)
clr_bmp~& = Point(0,0)
''clear color
_ClearColor clr_png~&, image&(1)
_ClearColor clr_bmp~&, image&(2)

Screen _NewImage(640, 480, 32)

''
Print "Reference color: ", _RGB(255,0,255)
Print "png BG color  : ", clr_png~&
Print "bmp BG color  : ", clr_bmp~&

''show the images with clear color set
'_ClearColor _RGB(255, 0, 255), image&(1)
'_ClearColor _RGB(255, 0, 255), image&(2)

_PutImage(10, 100), image&(1)
_PutImage(10, 200), image&(2)

''release images
_FreeImage image&(1)
_FreeImage image&(2)

It even shows the BG colors as being different, but they still work in a 32bit screen.  Of course, this would be a non issue if I had just setup my Screen first like  a normal human being.

I feel like I should apologize for this rabbit hole I'm dragging you all down.  Big Grin
Reply


Messages In This Thread
RE: Can anyone tell me why this won't compile? - by CMR - 04-10-2025, 02:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using gcc to compile C file aurel 22 4,220 04-22-2024, 03:48 PM
Last Post: aurel
  Can't compile .bas files PhilOfPerth 11 2,004 01-03-2023, 02:21 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: 2 Guest(s)