| View previous topic :: View next topic |
| Author |
Message |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Fri May 19, 2006 4:13 am Post subject: image sizes |
|
|
I want some clarity here, people. In theory, luaplayer should be able to handle 512x512 images. I found out earlier that 512 width is not supported, but it now seems that the height can't be greater than 272 either.
I tried the windows version of luaplayer and it gave me an invalid image size error with this code: Image.createEmpty(64, 320). Can anyone tell me if this also occurs on the psp? And what are the actual restrictions? I'm not sure what resolutions are supported _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Fri May 19, 2006 6:00 am Post subject: |
|
|
In the PSP LuaPlayer, it won't allow you to load an image over 512x512 pixels (the loadImage function in graphics.c checks and returns null if it didn't load, the Lua function then spits out an error on a debug screen).
I don't think I've ever tried an image bigger then 272 on LuaPlayer though...
Hmm... it would be interesting to make a LuaPlayer that uses OSLib as it's image functions. It should speed up many many programs and would support images bigger then 512x512. |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Sat May 20, 2006 7:31 am Post subject: |
|
|
How come nobody knows this and i keep telling everybody?
Lua can handle bigger images than 512x512. I myself use 1000x1000 images. There is one catch it has to be in JPG format. Also it shouldn't be to big a filesize (ok so two catches). The biggest i use is 58 kB. I haven't tested the limits, but maybe Shine can tell us? |
|
| Back to top |
|
 |
be2003
Joined: 20 Apr 2006 Posts: 144
|
Posted: Sat May 20, 2006 8:47 am Post subject: |
|
|
512x512 is the max for Image.createEmpty not Image.load and if your version is up to date it should be no issue... _________________ - be2003
blog |
|
| Back to top |
|
 |
Gary13579
Joined: 15 Aug 2005 Posts: 93
|
Posted: Sat May 20, 2006 8:55 am Post subject: |
|
|
Image.load calls the C function loadImage, does it not? That then checks to see if the image is a PNG. If it is, it calls loadPngImage.
This code is right in graphics.cpp...
| Code: | if (width > 512 || height > 512) {
free(image);
fclose(fp);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
return NULL;
}
|
|
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sat May 20, 2006 4:47 pm Post subject: |
|
|
I used this really old windows version by lumo. I'll try some newer versions _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
the underminer
Joined: 03 Oct 2005 Posts: 124 Location: Netherlands
|
Posted: Sat May 20, 2006 4:57 pm Post subject: |
|
|
Yes!, it works with the 0.14 windows version I found on luaplayer.org _________________ Behold! The Underminer got hold of a PSP |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Mon May 22, 2006 8:16 pm Post subject: |
|
|
| Altair wrote: | | Lua can handle bigger images than 512x512. I myself use 1000x1000 images. There is one catch it has to be in JPG format. Also it shouldn't be to big a filesize (ok so two catches). The biggest i use is 58 kB. I haven't tested the limits, but maybe Shine can tell us? |
Maybe this is possible, but then it is a bug, because it would lead to undefined results when trying to blit it. But it's already on my TODO list to hide all this hardware related stuff and allow images as big as you have memory. |
|
| Back to top |
|
 |
Altair
Joined: 20 May 2006 Posts: 76 Location: The Netherlands
|
Posted: Tue May 23, 2006 6:23 am Post subject: |
|
|
| Nope it works perfectly, no troubles with it what so ever! |
|
| Back to top |
|
 |
|