Is there any one how nows have to convert jpg buffter to pixel rbg buffer.
in other words get the date compilede over to raw data so that it can be show on the screne by runing the buffer...
ps i need to work with the data to be able to use it, so i need it to be blocks of [R][G] for itch pixel f.eks in one buffer eller 3buffer
Hope somone can help thanks
Camra problem
use libjpg:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
I include a sample using libjpg called test0:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
note: when you compile ps2sdk, this sample doesn't get copied to the /samples folder like other samples do.
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
I include a sample using libjpg called test0:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
note: when you compile ps2sdk, this sample doesn't get copied to the /samples folder like other samples do.
hey
thanks i have been looking at the libjpg, but i can not convert the jpg_buffer to the jpgData buffter that the libjpg are using.
the eksample only show have to send the data to the pc, as a jpeg, but i can not use the jpg data i need the raw data so that i can show it on the screen and there by usign the pixle value to make som image processing,.
when i am trying to convert the buffer the system of the playstation shutdown.
Hope you can help me a littel more thanks
ps. have got the test0 to work and it is nice work
thanks i have been looking at the libjpg, but i can not convert the jpg_buffer to the jpgData buffter that the libjpg are using.
the eksample only show have to send the data to the pc, as a jpeg, but i can not use the jpg data i need the raw data so that i can show it on the screen and there by usign the pixle value to make som image processing,.
when i am trying to convert the buffer the system of the playstation shutdown.
Hope you can help me a littel more thanks
ps. have got the test0 to work and it is nice work
ok, after you compile libjpg and include it to you project, this is how you convert the jpeg image to rgb buffer:
the data in jpg_buffer is 100% a jpeg file.
to convet it to rgb:
after you extract the frame with:
ret = PS2CamExtractFrame(devid, jpg_buffer, 500512);
'ret' is the size of the file.
you con open the buffer like this
jpgData *jpg;
jpg = jpgOpenRAW( &jpg_buffer, ret);
then create your rgb buffer like this:
unsigned char my_rgb_buff[640*480*3];
then convert the jpeg to rgb like this:
jpgReadImage(jpg, &my_rgb_buff[0]);
the data in jpg_buffer is 100% a jpeg file.
to convet it to rgb:
after you extract the frame with:
ret = PS2CamExtractFrame(devid, jpg_buffer, 500512);
'ret' is the size of the file.
you con open the buffer like this
jpgData *jpg;
jpg = jpgOpenRAW( &jpg_buffer, ret);
then create your rgb buffer like this:
unsigned char my_rgb_buff[640*480*3];
then convert the jpeg to rgb like this:
jpgReadImage(jpg, &my_rgb_buff[0]);