Is love.image.newImageData broke?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Chief
Party member
Posts: 101
Joined: Fri Mar 12, 2010 7:57 am
Location: Norway, 67° north

Is love.image.newImageData broke?

Post by Chief »

so i tried to run:

Code: Select all

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

Solutions? :huh:
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Is love.image.newImageData broke?

Post by bartbes »

Read the forum rules please.
User avatar
Chief
Party member
Posts: 101
Joined: Fri Mar 12, 2010 7:57 am
Location: Norway, 67° north

Re: Is love.image.newImageData broke?

Post 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
Last edited by Chief on Thu Jun 02, 2011 11:16 pm, edited 1 time in total.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Is love.image.newImageData broke?

Post by bartbes »

Well, it's probably something with the image, so without it, there's not much we can do, can we?
User avatar
Chief
Party member
Posts: 101
Joined: Fri Mar 12, 2010 7:57 am
Location: Norway, 67° north

Re: Is love.image.newImageData broke?

Post 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?
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Is love.image.newImageData broke?

Post by Lafolie »

PNG is generally the best format to use for many reasons. I use ImageData objects in my game and it works fine.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Chief
Party member
Posts: 101
Joined: Fri Mar 12, 2010 7:57 am
Location: Norway, 67° north

Re: Is love.image.newImageData broke?

Post 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!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests