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 > having trouble loading smaller than 256*192 jpeg images

#57577 - ninogenio - Mon Oct 17, 2005 3:15 am

has any one else had trouble loading small jpegs using jpeg_decompress_image im trying to do it with chrism`s fat driver i can get 256*192 images loaded no trouble but when i try a 126*10 image it doesnt draw anything.

#57580 - headspin - Mon Oct 17, 2005 3:28 am

If your using Burton Radons jpeg decompression libraries modified for DS, then in gba-jpeg-decode.c I modified the width and height of the arrays to suit the DS screen.

Code:
JPEG_Convert (row [256], YBlock [2 * JPEG_DCTSIZE + 0], Cb, Cr); // 240
JPEG_Convert (row [257], YBlock [2 * JPEG_DCTSIZE + 1], Cb, Cr); // 241


You could modify these to allow smaller sized images, I think doublec may have modified them again to allow different sizes. Check out this link
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#57648 - ninogenio - Mon Oct 17, 2005 4:23 pm

thanks i got the libs from doublecs tut.how would i go about changing those two lines for smaller graphics and is there any way to modify the c code to allow all sizes of jpegs thanks for any help givin.