gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Load dynamic jpg, and reposition and resize functions?

#162232 - IVO_ - Thu Aug 28, 2008 11:23 am

Hi everyone!

I'm learning PAlib, and I need to load one jpg dynamic from FAT. I think that I can do it with Palib, but I can't find any function, to position and resize the image.

Can someone help me?

Thanks!

#162266 - vuurrobin - Thu Aug 28, 2008 10:36 pm

try the palib forums, cause not many people here program with palib.

#162268 - IVO_ - Fri Aug 29, 2008 12:44 am

Thanks, but I think I can't do it in PAlib, and I haven't any troubles to use another library.

I have seen in other sites that I need load de image in the VRAM with a function that decompress jpeg, but I don't know use this function and I'm not really sure if with this I can resize and position the image.

#162270 - chuckstudios - Fri Aug 29, 2008 4:38 am

IVO_ wrote:
Thanks, but I think I can't do it in PAlib, and I haven't any troubles to use another library.

I have seen in other sites that I need load de image in the VRAM with a function that decompress jpeg, but I don't know use this function and I'm not really sure if with this I can resize and position the image.


Resizing would involve usage of an image scaling algorithm such as nearest neighbor or bilinear interpolation. Positioning, at least in a framebuffer, would simply be ((y * screenwidth) + x), although you'd need code to ensure the image doesn't 'wrap' around to the other side of the screen.

#162279 - IVO_ - Fri Aug 29, 2008 9:55 am

Thank you very much!

I'm reading the first manual of this forum (the recomended) and I'm learning more interesting things.

Thanks again! :D