Search found 9 matches
- Thu May 22, 2014 8:52 pm
- Forum: Support and Development
- Topic: Image requirements
- Replies: 2
- Views: 1169
Re: Image requirements
Oh, it was just me being a noob then. :) I was thinking I could load large images like that and then divide them into smaller quads which could be drawn when needed. I see now that it doesn't make sense. So I guess I need to divide the actual png file in several smaller image files and then load the...
- Thu May 22, 2014 8:01 pm
- Forum: Support and Development
- Topic: Image requirements
- Replies: 2
- Views: 1169
Image requirements
Hi guys,
Are there any requirements on the images one can use (except the file format)?
The reason I'm asking is that I have a pretty large png image (6000x10000 pixels at 72 ppi), which I can load it seems, but I cannot draw quads from it. They just turn up checkered.
Are there any requirements on the images one can use (except the file format)?
The reason I'm asking is that I have a pretty large png image (6000x10000 pixels at 72 ppi), which I can load it seems, but I cannot draw quads from it. They just turn up checkered.
- Wed May 07, 2014 5:32 pm
- Forum: Support and Development
- Topic: String representation of an image
- Replies: 5
- Views: 3201
Re: String representation of an image
Yes, it makes sense to send the already encoded data. So I'll use the love.filesystem.read alternative.
Thanks guys!
Thanks guys!
- Tue May 06, 2014 10:48 pm
- Forum: Support and Development
- Topic: String representation of an image
- Replies: 5
- Views: 3201
Re: String representation of an image
Aha.. Can I convert the string of bytes from the second example to an image object again? Basically I want to send an image object to another love process over the network. So I'm trying to find out my alternatives. Since I will already have the image object loaded from file I'd like to be able to d...
- Tue May 06, 2014 10:29 pm
- Forum: Support and Development
- Topic: String representation of an image
- Replies: 5
- Views: 3201
String representation of an image
Hi, What is the difference between the string representation ("imgString" below) of an image in these two examples? local imgString, size = love.filesystem.read("image.png") local image1 = love.graphics.newImage("image.png") local imageData = image1:getData() local imgS...
- Sat May 03, 2014 4:57 pm
- Forum: General
- Topic: [SOLVED] Loveframes SetUsable
- Replies: 1
- Views: 1143
Re: Loveframes SetUsable
As a workaround I'm currently doing:
It feels a bit cumbersome though.
Code: Select all
textinput.OnTextChanged = textChanged
-snip-
function textChanged(obj, text)
obj:SetText(obj:GetText():gsub("%s+", ""))
end
- Sat May 03, 2014 4:14 pm
- Forum: General
- Topic: [SOLVED] Loveframes SetUsable
- Replies: 1
- Views: 1143
[SOLVED] Loveframes SetUsable
Hi, I'm using the awesome loveframes lib and am trying to restrict the user from entering anything but numbers in a textinput object. So I've tried: local textinput = loveframes.Create("textinput") textinput:SetUsable({"1", "2", "3", "4", "5&quo...
- Fri May 02, 2014 8:08 am
- Forum: General
- Topic: Problem with Lua module
- Replies: 2
- Views: 1621
Re: Problem with Lua module
Oh, yes of course! Thanks!
I'll just have an init function that the user of the interface must call first then.
I'll just have an init function that the user of the interface must call first then.
Code: Select all
local callbacks = {}
function interface.init()
callbacks = {
prim1Callback,
prim2Callback
}
end
- Thu May 01, 2014 11:56 pm
- Forum: General
- Topic: Problem with Lua module
- Replies: 2
- Views: 1621
Problem with Lua module
Hi guys, I have a very basic Lua problem I guess. I've been trying to implement a simple module as a basic messaging interface with a couple of primitives, static callback functions and a dispatcher function. The problem is that when I try to use the callbacks array it always results in nil. I've at...