Search found 146 matches

by Ubermann
Sun Jan 27, 2013 9:04 pm
Forum: Support and Development
Topic: Knowing if userdata is really an image
Replies: 3
Views: 3160

Re: Knowing if userdata is really an image

Santos wrote:Assuming we're talking about Image objects, does this work?

Code: Select all

if image:typeOf("Image") then
No.

It is in fact ImageData type of object.
And when doing type() it just returns "userdata".
But I need to know if it really contains data that is image data or not.
by Ubermann
Sun Jan 27, 2013 12:40 pm
Forum: Support and Development
Topic: Knowing if userdata is really an image
Replies: 3
Views: 3160

Knowing if userdata is really an image

How? So I can predict and avoid app crashes? Because doing type(myImage) only tell me that it is userdata. I could run through all elements in userdata and check if all of them are {r, g, b, a}, but since i'm implementing support for CMYK and HSV colors, it would be too much time invested for just t...
by Ubermann
Sun Jan 27, 2013 12:32 pm
Forum: Support and Development
Topic: What the user expects when error happens?
Replies: 10
Views: 5608

Re: What the user expects when error happens?

+1 to the difference in "users". A gamer playing a game -> helpful message saying "could not find the file". A programmer using a library -> error (make sure he's got a way to check for file existence before calling your function, so he can provide the right experience to the ga...
by Ubermann
Fri Jan 25, 2013 12:09 pm
Forum: Support and Development
Topic: What the user expects when error happens?
Replies: 10
Views: 5608

Re: What the user expects when error happens?

I expect it to error. This is also important, in high-uptime systems, it is common to "crash early", why? Well, because if you don't crash when there's a reason to, instead you return or keep some invalid state, everything will break later, maybe not in a controlled fashion, data is lost,...
by Ubermann
Fri Jan 25, 2013 9:24 am
Forum: Support and Development
Topic: What the user expects when error happens?
Replies: 10
Views: 5608

What the user expects when error happens?

This is: lets say a function requires a file name to be passed to open it, then we do some operations and finally we return some USERDATA. But the user writes "foo.pngg" instead "foo.png". That file does not exist, so the function should return something instead of simply crashin...
by Ubermann
Fri Jan 25, 2013 8:51 am
Forum: Libraries and Tools
Topic: NekoLib: an easy-to-use image manipulation library
Replies: 5
Views: 7972

Re: IroLib: an easy image manipulation library

It would be cool if you add functions to transform the color space (at least RGB <-> HSL) and to convolve an image with a custom filter-kernel and maybe functions to create common kernels (e.g. blur, sharpen, sobel, ...). Some histogram operations (equalization, thresholding, ...) would also be nic...
by Ubermann
Thu Jan 24, 2013 8:41 pm
Forum: Libraries and Tools
Topic: NekoLib: an easy-to-use image manipulation library
Replies: 5
Views: 7972

Re: IroLib: an easy image manipulation library

Ref wrote:Nice library.
Good work!
Really dumb suggestion, how about doing the same thing using PixelEffects?
If I'm not mistaken (as usual) should be substantially faster?
Becuase I don't know GLSL syntax and as far as i know some shader functions may not be compatible in every system.
by Ubermann
Thu Jan 24, 2013 7:59 pm
Forum: Libraries and Tools
Topic: NekoLib: an easy-to-use image manipulation library
Replies: 5
Views: 7972

NekoLib: an easy-to-use image manipulation library

N e k o L i b : an user-friendly image manipulation library ね こ り べ Last version: 1.0 from 24-Jan-2013 DOWNLOAD (attachment .lua): https://love2d.org/forums/download/file.php?mode=view&id=6761 <= DLoad deactivated until next version with new lib name!!!! NekoLib is a (right now) simple library ...
by Ubermann
Thu Jan 24, 2013 11:32 am
Forum: Support and Development
Topic: Clipboard from Lua/Löve but system independant?
Replies: 3
Views: 3517

Re: Clipboard from Lua/Löve but system independant?

Not possible with plain Lua from LÖVE. You might be able to do it by implementing the whole functionality in C. The C would have to be platform-specific (win, mac, linux). I don't recommend it. Fok. Yes, I found some Wondows C implementation for this, but not for Penguins or Apples. Do you glimpse ...
by Ubermann
Thu Jan 24, 2013 9:39 am
Forum: Support and Development
Topic: Clipboard from Lua/Löve but system independant?
Replies: 3
Views: 3517

Clipboard from Lua/Löve but system independant?

How?

I googled for it but couldn't find anything that works in any system supported by LÖVE.

Any idea?