Page 1 of 1

Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 9:48 pm
by Chief
so i tried to run:

Code: Select all

local data = love.image.newImageData( "pic.png" )
it crashed love.

Solutions? :huh:

Re: Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 10:18 pm
by bartbes
Read the forum rules please.

Re: Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 11:03 pm
by Chief
bartbes wrote:Read the forum rules please.
I have, ill explain better this time. It's teaspoon time!

I only have internet on my mobile atm. So I can't upload a .love I'm afraid. The search says the bug was fixed in 0.7.2, but this doesn't seem to be the case. ( changelog says 0.7.2 )

The function was called in love.load().

This is the main.lua:

Code: Select all

function love.load()
    local data = love.image.newImageData( "pic.png" )
end

function love.draw()
end

function love.update(dt)
end

Re: Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 11:15 pm
by bartbes
Well, it's probably something with the image, so without it, there's not much we can do, can we?

Re: Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 11:19 pm
by Chief
I'll go to the cafe tomorrow, to upload the pic. then. Tho' it was made in PhotoShop so I don't believe that's the case...

Are there any prefered image formats besides png?

Re: Is love.image.newImageData broke?

Posted: Thu Jun 02, 2011 11:25 pm
by Lafolie
PNG is generally the best format to use for many reasons. I use ImageData objects in my game and it works fine.

Re: Is love.image.newImageData broke?

Posted: Fri Jun 03, 2011 6:01 am
by Chief
It seems that redownloading love fixed the problem! I must have replaced love.exe with an older version or something...
Sorry for the noobish post, won't happen again! Case closed!