Re: Graphics Doubts
- Posted by Lucius L Hilley III <luciuslhilleyiii at JUNO.COM> Jul 11, 1997
- 910 views
On Fri, 11 Jul 1997 20:09:19 +0000 Ralf Nieuwenhuijsen writes: >> Hi to all. >> I agree with Eric Dobbertin, when we read and display a BMP file in >the >> screen, a rectangle wich color variate with the palette used appear >around >> the corners of screen. I'd like to know if anyone have a solution to >> this... > Well, some color value of the palette is used, i think it is >either >0 or 255, try and find out... palette color 16 is the screen border. quick and lousy solution is. pal_bmp = read_bitmap("someimge.bmp") pal = pal_bmp[1] bmp = pal_bmp[2] pal[16 + 1] = {0, 0, 0} > >> Another thing is: why I can't turn the background color when a >bitmap is >> being displayed in screen? > There is NO such thing as background color in Graphics mode, >everything is foreground color. If you set the background color it >only changes the palette (the visible color) of each pixel drawn with >color 0. BitMaps dont' have background colors too. You are asking the >wrong question... > Why did you assume there is a background color in Graphics >Mode, >Euphoria isn't a human robot that can deside what is background and >what not when you're plotting pixels.. with text it can.. the >character itself is foreground and everything else is background..but >NOT with background, no matter what some1 tells you, there is no such >thing as a REAL background color in graphics mode, there are only >some routines that assume that color 0 is the background color. > But you can check what the palette value is of your image >background >(a value between 0 and 255) and then set the color it shoudl be ( >color is a combination of RED BLUE and Yellow) Ralf, it is not (RED, BLUE and Yellow). Monitors are sometimes called RGB monitors BEACUSE they use "R"ed, "G"reen, and "B"lue The values are {Red, Green, Blue} The values can go from 0 to 64 in Euphoria. In Windows and other programs they can go from 0 to 255 Examples: Black = {0, 0, 0} Red = {64, 0, 0} Green = {0, 64, 0} Blue = {0, 0, 64} White = {64, 64, 64} >> And finally, how much colors Euphoria can suport? (please, don't >send me >> projections and proportions, I really want to know in numbers, like >16 >> colors, 256 colors, 16800000 colors <-- WOW!). >> Thanks to all.. 64 x 64 x 64 = 262,144 So "262,144" colors are available. Only 256 can be used and showed at any given time Only 256 can be stored on the palette. Windows would support 256 x 256 x 256 = 16,777,216 > Read Packard's tutorial, but the maximum colors support in >Euphoria >is 256 colors, but you have to be in a videomode of that number of >colors (like Mode 19) > --Lucius Lamar Hilley III -- E-mail at luciuslhilleyiii at juno.com -- I support transferring of files less than 60K. -- I can Decode both UU and Base64 format.