Sponsored Content
Operating Systems OS X (Apple) 256 Color Support Removed in Leopard. Post 302171721 by c1996b2 on Friday 29th of February 2008 09:13:16 AM
Old 02-29-2008
256 Color Support Removed in Leopard.

I've recently 'upgraded' my Mac Pro to Leopard and in the process have killed a major piece of cross platform software (IDL) that I use in my work. Apparently, Leopard has disabled 256 color compatibility, while simultaneously leaving the option as ghosted teaser on the displays panel of system preferences. They even have a posting on this (answer 306773) that claims this is 'normal'.

Now, I don't actually want to set the global display to 256 colors, but my application works in X11, where I need the individual windows to open with 8-bit color depth. This was never a problem with Tiger (or Windows or Linux). So long as the OS supports 256 colors, the windows open fine under X. As things are now, when I open X in 256 color mode, I get blank white screens on the same machine where they were working fine on before the upgrade!

Does anyone know if this is going to be fixed or if there is a workaround that will enable me to use this program? I can't be the only one with specialized or legacy software that requires 8-bit color support. As it stands now, I'm pretty much frozen out of the Mac OS as a work computer unless I go back to Tiger. I'm in the process of getting a new set of computers for the group I'm in, and, if this isn't fixable, I'm probably going to have cancel my mac orders and switch to PCs instead.

Any ideas out there?
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies
SDL_SetColors(3)						 SDL API Reference						  SDL_SetColors(3)

NAME
SDL_SetColors - Sets a portion of the colormap for the given 8-bit surface. SYNOPSIS
#include "SDL.h" int SDL_SetColors(SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors); DESCRIPTION
Sets a portion of the colormap for the given 8-bit surface. When surface is the surface associated with the current display, the display colormap will be updated with the requested colors. If SDL_HWPALETTE was set in SDL_SetVideoMode flags, SDL_SetColors will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation. The color components of a SDL_Color structure are 8-bits in size, giving you a total of 256^3 =16777216 colors. Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display). SDL_SetColors modifies both pal- ettes (if present), and is equivalent to calling SDL_SetPalette with the flags set to (SDL_LOGPAL | SDL_PHYSPAL). RETURN VALUE
If surface is not a palettized surface, this function does nothing, returning 0. If all of the colors were set as passed to SDL_SetColors, it will return 1. If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the actual color palette. EXAMPLE
/* Create a display surface with a grayscale palette */ SDL_Surface *screen; SDL_Color colors[256]; int i; . . . /* Fill colors with color information */ for(i=0;i<256;i++){ colors[i].r=i; colors[i].g=i; colors[i].b=i; } /* Create display */ screen=SDL_SetVideoMode(640, 480, 8, SDL_HWPALETTE); if(!screen){ printf("Couldn't set video mode: %s ", SDL_GetError()); exit(-1); } /* Set palette */ SDL_SetColors(screen, colors, 0, 256); . . . . SEE ALSO
SDL_Color SDL_Surface, SDL_SetPalette, SDL_SetVideoMode SDL
Tue 11 Sep 2001, 23:01 SDL_SetColors(3)
All times are GMT -4. The time now is 09:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy