/external/fonttools/Lib/fontTools/ttLib/tables/ |
H A D | C_P_A_L_.py | 23 palette = [] 26 palette.append( Color(*struct.unpack(">BBBB", data[ppos:ppos+4])) ) 28 self.palettes.append(palette) 34 for palette in self.palettes: 35 assert(len(palette) == self.numPaletteEntries) 36 for color in palette: 46 for index, palette in enumerate(self.palettes): 47 writer.begintag("palette", index=index) 49 assert(len(palette) == self.numPaletteEntries) 50 for cindex, color in enumerate(palette) [all...] |
/external/fonttools/Tools/fontTools/ttLib/tables/ |
H A D | C_P_A_L_.py | 23 palette = [] 26 palette.append( Color(*struct.unpack(">BBBB", data[ppos:ppos+4])) ) 28 self.palettes.append(palette) 34 for palette in self.palettes: 35 assert(len(palette) == self.numPaletteEntries) 36 for color in palette: 46 for index, palette in enumerate(self.palettes): 47 writer.begintag("palette", index=index) 49 assert(len(palette) == self.numPaletteEntries) 50 for cindex, color in enumerate(palette) [all...] |
/external/opencv/otherlibs/highgui/ |
H A D | utils.cpp | 341 void CvtPaletteToGray( const PaletteEntry* palette, uchar* grayPalette, int entries ) argument 346 icvCvt_BGR2Gray_8u_C3C1R( (uchar*)(palette + i), 0, grayPalette + i, 0, cvSize(1,1) ); 351 void FillGrayPalette( PaletteEntry* palette, int bpp, bool negative ) argument 359 palette[i].b = palette[i].g = palette[i].r = (uchar)val; 360 palette[i].a = 0; 365 bool IsColorPalette( PaletteEntry* palette, int bpp ) argument 371 if( palette[i].b != palette[ [all...] |
H A D | utils.h | 96 void FillGrayPalette( PaletteEntry* palette, int bpp, bool negative = false ); 97 bool IsColorPalette( PaletteEntry* palette, int bpp ); 98 void CvtPaletteToGray( const PaletteEntry* palette, uchar* grayPalette, int entries ); 104 uchar* FillColorRow8( uchar* data, uchar* indices, int len, PaletteEntry* palette ); 105 uchar* FillGrayRow8( uchar* data, uchar* indices, int len, uchar* palette ); 106 uchar* FillColorRow4( uchar* data, uchar* indices, int len, PaletteEntry* palette ); 107 uchar* FillGrayRow4( uchar* data, uchar* indices, int len, uchar* palette ); 108 uchar* FillColorRow1( uchar* data, uchar* indices, int len, PaletteEntry* palette ); 109 uchar* FillGrayRow1( uchar* data, uchar* indices, int len, uchar* palette );
|
/external/chromium_org/third_party/mesa/src/src/mesa/main/ |
H A D | texcompress_cpal.h | 35 GLsizei imageSize, const void *palette);
|
H A D | texcompress_cpal.c | 67 * Get a color/entry from the palette. 70 get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette, argument 73 memcpy(pixel, palette + info->size * index, info->size); 82 paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette, argument 95 pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 96 pix += get_palette_entry(info, palette, ind[i] & 0xf, pix); 99 get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 106 pix += get_palette_entry(info, palette, ind[i], pix); 163 * compressed palette format into a regular GLubyte/RGBA glTexImage2D() call. 169 GLsizei imageSize, const void *palette) 166 _mesa_cpal_compressed_teximage2d(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei imageSize, const void *palette) argument [all...] |
/external/mesa3d/src/mesa/main/ |
H A D | texcompress_cpal.h | 35 GLsizei imageSize, const void *palette);
|
H A D | texcompress_cpal.c | 67 * Get a color/entry from the palette. 70 get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette, argument 73 memcpy(pixel, palette + info->size * index, info->size); 82 paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette, argument 95 pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 96 pix += get_palette_entry(info, palette, ind[i] & 0xf, pix); 99 get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix); 106 pix += get_palette_entry(info, palette, ind[i], pix); 163 * compressed palette format into a regular GLubyte/RGBA glTexImage2D() call. 169 GLsizei imageSize, const void *palette) 166 _mesa_cpal_compressed_teximage2d(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei imageSize, const void *palette) argument [all...] |
/external/qemu/distrib/sdl-1.2.15/src/video/ |
H A D | SDL_pixels.c | 56 format->palette = NULL; 126 format->palette = (SDL_Palette *)SDL_malloc(sizeof(SDL_Palette)); 127 if ( format->palette == NULL ) { 132 (format->palette)->ncolors = ncolors; 133 (format->palette)->colors = (SDL_Color *)SDL_malloc( 134 (format->palette)->ncolors*sizeof(SDL_Color)); 135 if ( (format->palette)->colors == NULL ) { 141 /* create palette according to masks */ 190 format->palette->colors[i].r=r; 194 format->palette [all...] |
H A D | SDL_bmp.c | 58 SDL_Palette *palette; local 231 /* Load the palette, if any */ 232 palette = (surface->format)->palette; 233 if ( palette ) { 239 SDL_RWread(src, &palette->colors[i].b, 1, 1); 240 SDL_RWread(src, &palette->colors[i].g, 1, 1); 241 SDL_RWread(src, &palette->colors[i].r, 1, 1); 242 palette->colors[i].unused = 0; 246 SDL_RWread(src, &palette [all...] |
/external/skia/src/utils/ |
H A D | SkTextureCompressor.cpp | 37 // Generates an LATC palette. LATC constructs 38 // a palette of eight colors from LUM0 and LUM1 using the algorithm: 58 static void generate_palette(uint8_t palette[], uint8_t lum0, uint8_t lum1) { argument 59 palette[0] = lum0; 60 palette[1] = lum1; 63 palette[i+1] = ((7-i)*lum0 + i*lum1) / 7; 67 palette[i+1] = ((5-i)*lum0 + i*lum1) / 5; 69 palette[6] = 0; 70 palette[7] = 255; 92 uint8_t palette[kPaletteSiz local 138 uint8_t palette[kPaletteSize]; local [all...] |
/external/qemu/distrib/sdl-1.2.15/src/video/aalib/ |
H A D | SDL_aavideo.h | 42 aa_palette palette; member in struct:SDL_PrivateVideoData 54 #define AA_palette (this->hidden->palette)
|
/external/chromium_org/third_party/skia/src/utils/ |
H A D | SkTextureCompressor_LATC.cpp | 21 // Generates an LATC palette. LATC constructs 22 // a palette of eight colors from LUM0 and LUM1 using the algorithm: 43 static void generate_latc_palette(uint8_t palette[], uint8_t lum0, uint8_t lum1) { argument 44 palette[0] = lum0; 45 palette[1] = lum1; 48 palette[i+1] = ((7-i)*lum0 + i*lum1) / 7; 52 palette[i+1] = ((5-i)*lum0 + i*lum1) / 5; 54 palette[6] = 0; 55 palette[7] = 255; 140 uint8_t palette[kLATCPaletteSiz local 186 uint8_t palette[kLATCPaletteSize]; local 410 uint8_t palette[kLATCPaletteSize]; local [all...] |
/external/libpng/contrib/examples/ |
H A D | pngpixel.c | 82 /* The palette case is slightly more difficult - the palette and, if 89 png_colorp palette = NULL; local 92 if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & 93 PNG_INFO_PLTE) && num_palette > 0 && palette != NULL) 101 palette[index].red, palette[index].green, 102 palette[index].blue, 107 palette[index].red, palette[inde [all...] |
/external/qemu/distrib/sdl-1.2.15/test/ |
H A D | threadwin.c | 46 if ( icon->format->palette == NULL ) { 47 fprintf(stderr, "Icon must have a palette!\n"); 58 icon->format->palette->colors[*pixels].r, 59 icon->format->palette->colors[*pixels].g, 60 icon->format->palette->colors[*pixels].b); 230 SDL_Color palette[256]; local 304 palette[i].r = 255-i; 305 palette[i].g = 255-i; 306 palette[i].b = 255-i; 308 SDL_SetColors(screen, palette, [all...] |
H A D | testbitmap.c | 65 SDL_Color palette[256]; local 108 palette[i].r = 255-i; 109 palette[i].g = 255-i; 110 palette[i].b = 255-i; 112 SDL_SetColors(screen, palette, 0, 256);
|
H A D | testwm.c | 28 SDL_Color palette[256]; local 41 palette[i].r = 255-i; 42 palette[i].g = 255-i; 43 palette[i].b = 255-i; 45 SDL_SetColors(screen, palette, 0, 256); 88 if ( icon->format->palette == NULL ) { 89 fprintf(stderr, "Icon must have a palette!\n"); 100 icon->format->palette->colors[*pixels].r, 101 icon->format->palette->colors[*pixels].g, 102 icon->format->palette [all...] |
H A D | testpalette.c | 4 * A simple test of runtime palette modification for animation 79 /* set the palette to the logical screen palette so that blits 81 SDL_SetColors(bg, screen->format->palette->colors, 0, 256); 112 /* copy palette */ 113 SDL_SetColors(z, s->format->palette->colors, 114 0, s->format->palette->ncolors); 169 /* Ask explicitly for 8bpp and a hardware palette */ 183 boatcols = boat[0]->format->palette->ncolors; 189 * First set the physical screen palette t [all...] |
H A D | graywin.c | 109 SDL_Color palette[NUM_COLORS]; local 124 palette[i].r = (NUM_COLORS-1)-i * (256 / NUM_COLORS); 125 palette[i].g = (NUM_COLORS-1)-i * (256 / NUM_COLORS); 126 palette[i].b = (NUM_COLORS-1)-i * (256 / NUM_COLORS); 128 SDL_SetColors(screen, palette, 0, NUM_COLORS);
|
/external/chromium_org/third_party/libpng/ |
H A D | pngrtran.c | 145 /* Dither file to 8 bit. Supply a palette, the current number 146 * of elements in the palette, the maximum number of elements 148 * of colors is greater then the maximum number, the palette will be 164 png_set_dither(png_structp png_ptr, png_colorp palette, argument 202 /* Find the least used palette entries by starting a 232 /* Swap the palette around, and set up a table, if necessary */ 247 palette[i] = palette[j]; 269 tmp_color = palette[j]; 270 palette[ 938 png_colorp palette = png_ptr->palette; local 1107 png_colorp palette = png_ptr->palette; local 1134 png_colorp palette = png_ptr->palette; local 2569 png_build_grayscale_palette(int bit_depth, png_colorp palette) argument 2621 png_correct_palette(png_structp png_ptr, png_colorp palette, int num_palette) argument 3694 png_do_expand_palette(png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans) argument [all...] |
/external/qemu/distrib/libpng-1.2.46/ |
H A D | pngrtran.c | 145 /* Dither file to 8 bit. Supply a palette, the current number 146 * of elements in the palette, the maximum number of elements 148 * of colors is greater then the maximum number, the palette will be 164 png_set_dither(png_structp png_ptr, png_colorp palette, argument 202 /* Find the least used palette entries by starting a 232 /* Swap the palette around, and set up a table, if necessary */ 247 palette[i] = palette[j]; 269 tmp_color = palette[j]; 270 palette[ 938 png_colorp palette = png_ptr->palette; local 1107 png_colorp palette = png_ptr->palette; local 1134 png_colorp palette = png_ptr->palette; local 2569 png_build_grayscale_palette(int bit_depth, png_colorp palette) argument 2621 png_correct_palette(png_structp png_ptr, png_colorp palette, int num_palette) argument 3694 png_do_expand_palette(png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans) argument [all...] |
/external/libpng/contrib/libtests/ |
H A D | gentests.sh | 86 for ct in gray palette
|
/external/qemu/distrib/sdl-1.2.15/src/video/caca/ |
H A D | SDL_cacavideo.h | 63 #define Caca_palette (this->hidden->palette)
|
/external/zopfli/src/zopflipng/ |
H A D | zopflipng_lib.cc | 116 // If true, means palette is possible so avoid using different RGB values for 118 bool palette = count.size() <= 256; local 122 if (key || palette) { 126 // used as a valid color key, or in case of palette ensures a color 127 // existing in the input image palette is used. 142 if (!key && !palette) { 143 // Use the last encountered RGB value if no key or palette is used: that 152 // If there are now less colors, update palette of input image to match this. 153 if (palette && inputstate->info_png.color.palettesize > 0) { 157 unsigned char* palette_in = inputstate->info_png.color.palette; [all...] |
/external/qemu/distrib/sdl-1.2.15/src/video/directfb/ |
H A D | SDL_DirectFB_video.c | 215 IDirectFBPalette *palette; member in struct:private_hwdata 293 SDL_Palette *palette; local 296 palette = SDL_calloc (1, sizeof(SDL_Palette)); 297 if (!palette) 310 palette->ncolors = size; 311 palette->colors = colors; 313 return palette; 354 if (!format->palette) 355 format->palette = AllocatePalette(256); 608 /* And its palette i 1056 IDirectFBPalette *palette = this->screen->hwdata->palette; local 1093 IDirectFBPalette *palette = this->screen->hwdata->palette; local [all...] |