image sizes
Moderators: Shine, Insert_witty_name
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands
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
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
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.
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.
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?
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?
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...
This code is right in graphics.cpp...
Code: Select all
if (width > 512 || height > 512) {
free(image);
fclose(fp);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
return NULL;
}
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands
-
- Posts: 123
- Joined: Mon Oct 03, 2005 4:25 am
- Location: Netherlands
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.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?