ronenl
asked on
How can I find/create "RGB-565" image ?
Hi,
Where can I find/create an RGB-565 picture (preferably size 352x240) ?
(I need specific "565 rgb" format - not just "rgb").
Where can I find/create an RGB-565 picture (preferably size 352x240) ?
(I need specific "565 rgb" format - not just "rgb").
ASKER
hewittq,
Thank you for the trouble, but I need
specific format: RGB-565.
I don't know what it means-
(I'd be glad if you knew).
Thank you for the trouble, but I need
specific format: RGB-565.
I don't know what it means-
(I'd be glad if you knew).
Another URL:
http://www.intel.dk/ial/rdx/release.htm
"Intel Realistic Display Mixer (RDX) Developer's Kit"
http://www.intel.dk/ial/rdx/release.htm
"Intel Realistic Display Mixer (RDX) Developer's Kit"
Take a look at:
http://www.voodooextreme.com/glide3tutorial/english/tutorial16.htm
and the image:
http://www.voodooextreme.com/glide3tutorial/image/565.jpg
which uses '5' reds, '6' greens, and '5' blues.
http://www.voodooextreme.com/glide3tutorial/english/tutorial16.htm
and the image:
http://www.voodooextreme.com/glide3tutorial/image/565.jpg
which uses '5' reds, '6' greens, and '5' blues.
ASKER
The only thing I don't quite follow is -
how do I know that downloading the image
as *.jpg I'd get RGB565 ?
Does RGB565 has a specific name to the file
(*.tif , *.gif , *.jpg , .... ).
If I download your file as jpg , is it a conversion
or the real RGB565 ?
(I'm asking this because my knowledge in this
field is very poor, please forgive me if it's not
such a clever question.
I heard though of many types of images: YUV,RGB,RGB565,RGB888,Y-Cb -Cr,....).
how do I know that downloading the image
as *.jpg I'd get RGB565 ?
Does RGB565 has a specific name to the file
(*.tif , *.gif , *.jpg , .... ).
If I download your file as jpg , is it a conversion
or the real RGB565 ?
(I'm asking this because my knowledge in this
field is very poor, please forgive me if it's not
such a clever question.
I heard though of many types of images: YUV,RGB,RGB565,RGB888,Y-Cb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is from a good guy from a news group:
========================== =========
Hello!
> I need a RGB 565 Test image,
> The CD from the video book: Video demystified contains
> a RGB directory with many *.tif files.
>
> 1) How can I be sure that those files are RGB-565.
========================== =========
They almost certainly aren't 565 images. As I understand it, TIFF
technically allows you to set "BitsPerSample" to 5,6,5, but in practice
they're almost always 8,8,8.
> 2) Do you know of a web site in which I can download
> RGB-565 images?
I don't know of a format that popularly supports RGB-565 images.
>3) I once created YUV image in C++ (Simply wrote data to
> file in Y-Cb-Cr mode). How can I do that with "RGB 565" ?
> What is special about RGB-565 ?
This should be fairly easy. RGB-565 pixels are each 16 bits in size. The
ordering is:
"BBBBBGGGGGGRRRRR". You might find this article useful:
http://lesher.dyndns.org/highcolor.html
If you have a 24-bit image and are converting to 5-6-5, for each color, you
first clip to the correct number of bits (5 for red or blue; 6 for green),
and then shift it left the correct number of places (11 for blue, 6 for
green, 0 for red). (Some people like to round off to the correct number of
bits rather than truncating, but truncating is a bit easier and
significantly faster).
Your conversion loop would look a little like this (without optimization):
int i,j;
int lineWidth; /* width of one line in pixels */
char *src, *dest; /* src is 24-bit 888 B:G:R; dest is 16-bit 565 B:G:R*/
/* Not shown: repeat these two loops for each line of the image */
for (i=0; i < lineWidth; ++i)
{
for(j=0; j<lineWidth; ++j)
{
unsigned short * p = (unsigned short*)dest;
*p = ((unsigned short)*src) & 0xf8) << 11; /* blue */
++src;
*p |= ((unsigned short)*src) & 0xfc) << 6; /* green */
++src;
*p |= ((unsigned short)*src) & 0xf8); /* red */
++src;
dest += 2;
}
}
==========================
Hello!
> I need a RGB 565 Test image,
> The CD from the video book: Video demystified contains
> a RGB directory with many *.tif files.
>
> 1) How can I be sure that those files are RGB-565.
==========================
They almost certainly aren't 565 images. As I understand it, TIFF
technically allows you to set "BitsPerSample" to 5,6,5, but in practice
they're almost always 8,8,8.
> 2) Do you know of a web site in which I can download
> RGB-565 images?
I don't know of a format that popularly supports RGB-565 images.
>3) I once created YUV image in C++ (Simply wrote data to
> file in Y-Cb-Cr mode). How can I do that with "RGB 565" ?
> What is special about RGB-565 ?
This should be fairly easy. RGB-565 pixels are each 16 bits in size. The
ordering is:
"BBBBBGGGGGGRRRRR". You might find this article useful:
http://lesher.dyndns.org/highcolor.html
If you have a 24-bit image and are converting to 5-6-5, for each color, you
first clip to the correct number of bits (5 for red or blue; 6 for green),
and then shift it left the correct number of places (11 for blue, 6 for
green, 0 for red). (Some people like to round off to the correct number of
bits rather than truncating, but truncating is a bit easier and
significantly faster).
Your conversion loop would look a little like this (without optimization):
int i,j;
int lineWidth; /* width of one line in pixels */
char *src, *dest; /* src is 24-bit 888 B:G:R; dest is 16-bit 565 B:G:R*/
/* Not shown: repeat these two loops for each line of the image */
for (i=0; i < lineWidth; ++i)
{
for(j=0; j<lineWidth; ++j)
{
unsigned short * p = (unsigned short*)dest;
*p = ((unsigned short)*src) & 0xf8) << 11; /* blue */
++src;
*p |= ((unsigned short)*src) & 0xfc) << 6; /* green */
++src;
*p |= ((unsigned short)*src) & 0xf8); /* red */
++src;
dest += 2;
}
}
Here is some info I found. Not sure what you are looking for but hope this helps.
Glenn
http://www.geocities.com/SiliconValley/Horizon/1375/rgbeasy.html
http://rvcc2.raritanval.edu/~bnebeker/color.html
http://www.hoskinson.net/java/rgb/
http://tiger.coe.missouri.edu/~kc20/graphics.htm