Open ACIDULATED opened 2 years ago
It's likely that WiiLÖVE didn't crash at all and just isn't drawing the texture. This is a known issue, see https://github.com/GRRLIB/GRRLIB/discussions/12#discussioncomment-725819
I'm trying to look for ways around this, but in the meantime you can try padding the image with transparent pixels to fit the requirements.
wait, i changed it to fit the requirements! it's not working. here's the image: (btw i got this off of google, credits to whoever made it)!
Seems that there was also one more issue with the image. libpngu (PNG handling library) can't handle paletted images yet. The original image uses a palette instead of RGB values (probably automatically done to save space).
Here's the fixed image, it now draws with your code:
By the way, don't close this issue, because nothing was fixed. This is just a workaround.
How can I convert images to have RGB values in the future?
I used GIMP to convert the image from Indexed to RGB.
However, I may have found a way to integrate palette conversion into libpngu, so you might not need to do this in the future.
Fixed indexed PNGs in 19dd46f1c48f8d12af90ebcc17f234c162ba3949!
I made a modification of libpngu with fixes: https://github.com/HTV04/libpngu-mod
Screenshot (this is using your original image):
Next, I need to fix (or workaround in code) images that aren't multiples of 4.
so I had tried newImage, but that didn't work, and then I tried newTexture. It didn't crash or give me an error, its just a black screen. Here's my lua code:
function love.load()
kris = love.graphics.newTexture("kris.png");
end
function love.update(dt)
end
function love.draw()
love.graphics.draw(kris, 100, 100, 0, 1, 1, 48, 48);
end