Searched refs:palette (Results 1 - 25 of 26) sorted by relevance

12

/openjdk7/jdk/src/share/classes/com/sun/imageio/plugins/bmp/
H A DBMPMetadata.java88 public byte[] palette = null; field in class:BMPMetadata
169 if ((palette != null) && (paletteSize > 0)) {
171 int numComps = palette.length / paletteSize;
176 red = palette[j++] & 0xff;
177 green = palette[j++] & 0xff;
178 blue = palette[j++] & 0xff;
184 new Byte((byte)(palette[j++] & 0xff)));
194 if ((palette != null) && (paletteSize > 0)) {
197 int numComps = palette.length / paletteSize;
203 subNode1.setAttribute("red", "" + palette[
[all...]
H A DBMPImageReader.java113 private byte palette[]; field in class:BMPImageReader
274 // Read in the palette
277 palette = new byte[sizeOfPalette];
278 iis.readFully(palette, 0, sizeOfPalette);
279 metadata.palette = palette;
309 // Read in the palette
312 palette = new byte[sizeOfPalette];
313 iis.readFully(palette, 0, sizeOfPalette);
315 metadata.palette
[all...]
/openjdk7/jdk/test/sun/awt/image/ImageRepresentation/
H A DLUTCompareTest.java27 * @summary Test verifies that palette comparison procedure of
143 * 1) with {red, red} palette
144 * 2) with {blue, red } palette
167 private static BufferedImage createFrame(int[] palette) { argument
168 IndexColorModel icm = new IndexColorModel(getNumBits(palette.length),
169 palette.length, palette, 0, false, -1, DataBuffer.TYPE_BYTE);
181 throw new RuntimeException("Invalid palette size: " + size);
/openjdk7/jdk/src/windows/native/sun/windows/
H A Dawt_Win32GraphicsDevice.cpp80 palette = NULL;
110 if (palette) {
111 delete palette;
158 * appropriate palette structures.
278 // calling palette->Update() since we need it
286 if (!palette) {
287 palette = new AwtPalette(this);
289 palette->Update();
291 palette->UpdateLogical();
299 * The dynamic flag determines whether we use the system palette
[all...]
H A Dawt_Win32GraphicsDevice.h101 AwtPalette *palette; member in class:AwtWin32GraphicsDevice
/openjdk7/jdk/test/javax/imageio/plugins/png/
H A DShortHistogramTest.java28 * hIST chunk if length of image palette in not power of two.
221 int[] palette = createTestPalette(numColors);
226 palette, 0, false, -1,
249 int[] palette = new int[numColors];
255 palette[i] = 0xff000000 | (r << 16) | (g << 8) | b;
257 return palette;
/openjdk7/jdk/src/share/native/sun/awt/libpng/
H A Dpngrtran.c390 /* Dither file to 8-bit. Supply a palette, the current number
391 * of elements in the palette, the maximum number of elements
393 * of colors is greater then the maximum number, the palette will be
409 png_set_quantize(png_structp png_ptr, png_colorp palette, argument
448 /* Find the least used palette entries by starting a
479 /* Swap the palette around, and set up a table, if necessary */
495 palette[i] = palette[j];
517 tmp_color = palette[j];
518 palette[
1553 png_colorp palette = png_ptr->palette; local
1748 png_colorp palette = png_ptr->palette; local
1779 png_colorp palette = png_ptr->palette; local
3378 png_build_grayscale_palette(int bit_depth, png_colorp palette) argument
4414 png_do_expand_palette(png_row_infop row_info, png_bytep row, png_const_colorp palette, png_const_bytep trans_alpha, int num_trans) argument
[all...]
H A Dpnginfo.h64 * cleaned up before the structure is discarded: palette, trans, text,
91 png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ member in struct:png_info_def
92 png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
93 png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
163 * same order as the palette colors, starting from index 0. Values
170 png_color_16 trans_color; /* transparent color for non-palette image */
206 * various palette entries, so that a viewer can intelligently select a
207 * reduced-color palette, if required. Data is an array of "num_palette"
H A DCHANGES137 external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED
385 Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images.
702 own memory for info_ptr->palette. This makes it safe for the calling
703 application to free its copy of the palette any time after it calls
734 Changed the allocation of palette, history, and trans arrays back to
1122 Use png_malloc instead of png_zalloc to allocate palette in pngset.c
1176 Always allocate 256-entry internal palette, hist, and trans arrays, to
1209 Stopped a double free of palette, hist, and trans when not using free_me.
3176 Ensure that png_rgb_to_gray ignores palette mapped images, if libpng
3178 Fixed a failure to handle palette mappe
[all...]
H A Dpngset.c168 "Invalid palette size, hIST allocation skipped");
495 png_const_colorp palette, int num_palette)
506 png_error(png_ptr, "Invalid palette length");
510 png_warning(png_ptr, "Invalid palette length");
515 /* It may not actually be necessary to set png_ptr->palette here;
525 png_ptr->palette = (png_colorp)png_calloc(png_ptr,
528 png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color));
529 info_ptr->palette = png_ptr->palette;
494 png_set_PLTE(png_structp png_ptr, png_infop info_ptr, png_const_colorp palette, int num_palette) argument
[all...]
H A Dpngget.c845 png_colorp *palette, int *num_palette)
850 && palette != NULL)
852 *palette = info_ptr->palette;
844 png_get_PLTE(png_const_structp png_ptr, png_const_infop info_ptr, png_colorp *palette, int *num_palette) argument
H A Dpngpriv.h615 png_const_colorp palette, png_uint_32 num_pal));
665 png_const_sPLT_tp palette));
874 png_colorp palette, int num_palette));
911 png_bytep row, png_const_colorp palette, png_const_bytep trans,
H A Dpngstruct.h146 png_colorp palette; /* palette from the input file */ member in struct:png_struct_def
147 png_uint_16 num_palette; /* number of color entries in palette */
229 int cur_palette; /* current push library palette index */
251 png_bytep quantize_index; /* index translation for palette files */
324 in the palette */
326 palette color */
H A Dpngrutil.c627 /* Read and check the palette */
631 png_color palette[PNG_MAX_PALETTE_LENGTH]; local
674 png_warning(png_ptr, "Invalid palette chunk");
681 png_error(png_ptr, "Invalid palette chunk");
688 for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
704 palette[i].red = buf[0];
705 palette[i].green = buf[1];
706 palette[i].blue = buf[2];
752 png_set_PLTE(png_ptr, info_ptr, palette, num);
1669 background.red = (png_uint_16)png_ptr->palette[bu
[all...]
H A Dpng.h572 png_byte index; /* used for palette files */
610 /* When the depth of the sPLT palette is 8 bits, the color and alpha samples
617 png_charp name; /* palette name */
618 png_byte depth; /* depth of palette samples */
619 png_sPLT_entryp entries; /* palette entries */
620 png_int_32 nentries; /* number of palette entries */
1130 /* Expand to 16-bit channels, forces conversion of palette to RGB and expansion
1159 png_colorp palette));
1164 * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
1468 /* Turn on quantizing, and reduce the palette t
[all...]
H A Dpngtest.c1089 png_colorp palette; local
1092 if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette))
1093 png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette);
H A Dpng.c500 png_zfree(png_ptr, info_ptr->palette);
501 info_ptr->palette = NULL;
H A Dpngwutil.c895 /* Write the palette. We are careful not to trust png_color to be in the
900 png_write_PLTE(png_structp png_ptr, png_const_colorp palette, argument
918 png_error(png_ptr, "Invalid number of colors in palette");
923 png_warning(png_ptr, "Invalid number of colors in palette");
942 for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
954 pal_ptr=palette;
1219 /* Loop through each palette entry, writing appropriately */
1454 png_warning(png_ptr, "Invalid background palette index");
H A Dpngread.c449 /* Initialize palette, background, etc, after transformations
451 * the user to obtain a gamma-corrected palette, for example.
1189 png_zfree(png_ptr, png_ptr->palette);
1445 /* Optional call to gamma correct and add the background to the palette
1447 * update the palette for you (i.e., you selected such a transform above).
/openjdk7/jdk/src/windows/native/sun/java2d/windows/
H A DGDIBlitLoops.cpp40 RGBQUAD palette[256]; member in union:tagBitmapheader::__anon1081
153 // Copy palette info into bitmap for 8-bit image
155 memcpy(bmi.colors.palette, srcInfo.lutBase, srcInfo.lutSize * sizeof(RGBQUAD));
177 memcpy(bmi.colors.palette, byteGrayPalette, 256 * sizeof(RGBQUAD));
H A DGDIWindowSurfaceData.cpp137 // palette-sharing takes care of color issues for us. But
138 // on win98 if we don't realize a DC's palette, that
139 // palette does not appear to have correct access to the
403 // masks as a palette DIB is used instead. Likewise
773 RGBQUAD palette[256]; member in union:tagBitmapheader::__anon1082
780 // make sure that the latest palette info gets loaded into
783 // recreation only when the palette changes
819 memcpy(bmi.colors.palette, wsdo->device->GetSystemPaletteEntries(),
820 sizeof(bmi.colors.palette));
/openjdk7/jdk/src/share/classes/com/sun/imageio/plugins/common/
H A DPaletteBuilder.java65 protected ColorNode[] palette; field in class:PaletteBuilder
76 * of colors in the given image exceeds maximum palette size).
99 * Creates an palette representing colors from given image
101 * maximum palette size closest colors would be merged.
123 * palette for given image type.
129 * is likely to be able to create palette for this image type.
143 * palette for given rendered image.
149 * is likely to be able to create palette for this image type.
309 palette = new ColorNode[size];
336 palette[inde
[all...]
/openjdk7/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/
H A DJFIFMarkerSegment.java485 // We never write a palette image into the header
1026 * A JFIF thumbnail stored as an indexed palette image
1027 * using an RGB palette.
1062 // read the palette
1063 byte [] palette = new byte [PALETTE_SIZE];
1066 palette,
1081 palette,
1097 // Write the palette (must be 768 bytes)
1098 byte [] palette = new byte[768];
1107 palette[
[all...]
/openjdk7/jdk/src/share/classes/com/sun/imageio/plugins/png/
H A DPNGImageWriter.java492 byte[] palette = new byte[numEntries*3];
495 palette[index++] = metadata.PLTE_red[i];
496 palette[index++] = metadata.PLTE_green[i];
497 palette[index++] = metadata.PLTE_blue[i];
500 cs.write(palette);
838 // Reorder palette data if necessary
H A DPNGImageReader.java148 1, // palette
333 byte[] palette = new byte[chunkLength];
334 stream.readFully(palette);
366 metadata.PLTE_red[i] = palette[index++];
367 metadata.PLTE_green[i] = palette[index++];
368 metadata.PLTE_blue[i] = palette[index++];
580 // Alpha table may have fewer entries than RGB palette
658 * ignoreMetadata flag is set, and only if this is not a palette
1414 * The number of palette entries must not exceed the range that
1422 * Consequently, the case when the palette lengt
[all...]

Completed in 367 milliseconds

12