Computer Graphics

Moderators: Sephiroth
Number of threads: 1243
Number of posts: 2643

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
show 8bit images on 16bit screen? Posted by PAG on 20 Nov 2001 at 4:49 AM
Help me, I need to know how to display 8bit images on a 16bit screen mode...


Report
Re: show 8bit images on 16bit screen? Posted by Mutilate on 27 Nov 2001 at 4:58 AM
: Help me, I need to know how to display 8bit images on a 16bit screen mode...
:

I try to help you from what I know, but I can't give you the solutions.
The passage from 8bit to 16 bit maybe a problem 'cose they completly different meaning:
16 bit mean that you have an 16bit integer per pixel where the first 5 more sigificative bit are red's one (0-31), the 6 next one are green's one (0-63) and the last 5 one's are blue's one.
Bit/Color: F/R,E/R,D/R,C/R,B/R,A/G,9/G,8/G,7/G,6/G,5/G,4/B,3/B,2/B,1/B,0/B or RRRRRGGGGGGBBBBB

But the 8 Bit mean that you have an char (0-255) per pixel, that's an index for a palette(Color0, Color1, ecc.)
The palette has variable settings and dimension, it usually use 12bit (4bit for Red, 4 bit for blue and 4 for green), but the colors that are in a palette are usually variable so that you can with 256 colors better aproximate the original image. All this information should be in the image's header or it may use the windows's one.

What u have to do is to understend where is and what dimension have the image's palette, and the convert the palette format into 16 bit format:
Case 12 bit:
red_16=red_12+red_12
grn_16=grb_12<<2
blu_16=blu_12+blu_12




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.