Why is LoadImage returning null?
BlitzMax Forums/BlitzMax Programming/Why is LoadImage returning null?
| ||
When I start the code off with this, attempting to load a PNG image returns null:Framework brl.max2d Import brl.d3d9max2d Import brl.pngloader When I don't, the PNG loads fine. What am I missing? |
| ||
| Brl.graphics? on my phone at mo so cant check for sure |
| ||
The following code gives me a row of 3 images, what are you doing differently?
SuperStrict
Framework brl.max2d
Import brl.d3d9max2d
Import brl.pngloader
Local image:TImage, pixmap:TPixmap
Graphics 800, 600
image = LoadImage("smile.png")
DrawImage(image, 0, 0)
pixmap = LoadPixmap("smile.png")
DrawPixmap(pixmap, 64, 0)
image = LoadImage(pixmap)
DrawImage(image, 128, 0)
Flip
WaitKey()
Brl.graphics? It's imported by brl.d3d9max2d. |
| ||
| Strange, that works fine for me. I'm using a file included with Incbin, could it be a product of that? |
| ||
| Give me a minute to check. Edit: Quick thought, are you putting "incbin::" before the filename? |
| ||
Found it, add:Import brl.ramstream And it should be golden mate. |
| ||
| That's done it. Thanks much! |
| ||
| You could use Framework Assistant. It will tell you what you need to import. |