Lines Matching +full:j +full:- +full:to +full:- +full:k

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Convert a logo in ASCII PNM format to C source suitable for inclusion in
6 * (C) Copyright 2001-2003 by Geert Uytterhoeven <geert@linux-m68k.org>
100 val = 10*val+c-'0'; in get_number()
124 unsigned int i, j; in read_image() local
150 "Use pnmnoraw(1) to convert it to ASCII PNM\n", filename); in read_image()
174 for (j = 0; j < logo_width; j++) in read_image()
175 logo_data[i][j].red = logo_data[i][j].green = in read_image()
176 logo_data[i][j].blue = 255*(1-get_number(fp)); in read_image()
183 for (j = 0; j < logo_width; j++) in read_image()
184 logo_data[i][j].red = logo_data[i][j].green = in read_image()
185 logo_data[i][j].blue = get_number255(fp, maxval); in read_image()
192 for (j = 0; j < logo_width; j++) { in read_image()
193 logo_data[i][j].red = get_number255(fp, maxval); in read_image()
194 logo_data[i][j].green = get_number255(fp, maxval); in read_image()
195 logo_data[i][j].blue = get_number255(fp, maxval); in read_image()
279 unsigned int i, j; in write_logo_mono() local
284 for (j = 0; j < logo_width; j++) in write_logo_mono()
285 if (!is_black(logo_data[i][j]) && !is_white(logo_data[i][j])) in write_logo_mono()
293 for (j = 0; j < logo_width;) { in write_logo_mono()
294 for (val = 0, bit = 0x80; bit && j < logo_width; j++, bit >>= 1) in write_logo_mono()
295 if (logo_data[i][j].red) in write_logo_mono()
307 unsigned int i, j, k; in write_logo_vga16() local
312 for (j = 0; j < logo_width; j++) { in write_logo_vga16()
313 for (k = 0; k < 16; k++) in write_logo_vga16()
314 if (is_equal(logo_data[i][j], clut_vga16[k])) in write_logo_vga16()
316 if (k == 16) in write_logo_vga16()
318 "Use ppmquant(1) -map clut_vga16.ppm to reduce the number " in write_logo_vga16()
327 for (j = 0; j < logo_width; j++) { in write_logo_vga16()
328 for (k = 0; k < 16; k++) in write_logo_vga16()
329 if (is_equal(logo_data[i][j], clut_vga16[k])) in write_logo_vga16()
331 val = k<<4; in write_logo_vga16()
332 if (++j < logo_width) { in write_logo_vga16()
333 for (k = 0; k < 16; k++) in write_logo_vga16()
334 if (is_equal(logo_data[i][j], clut_vga16[k])) in write_logo_vga16()
336 val |= k; in write_logo_vga16()
347 unsigned int i, j, k; in write_logo_clut224() local
351 for (j = 0; j < logo_width; j++) { in write_logo_clut224()
352 for (k = 0; k < logo_clutsize; k++) in write_logo_clut224()
353 if (is_equal(logo_data[i][j], logo_clut[k])) in write_logo_clut224()
355 if (k == logo_clutsize) { in write_logo_clut224()
358 "Use ppmquant(1) to reduce the number of colors\n", in write_logo_clut224()
360 logo_clut[logo_clutsize++] = logo_data[i][j]; in write_logo_clut224()
369 for (j = 0; j < logo_width; j++) { in write_logo_clut224()
370 for (k = 0; k < logo_clutsize; k++) in write_logo_clut224()
371 if (is_equal(logo_data[i][j], logo_clut[k])) in write_logo_clut224()
373 write_hex(k+32); in write_logo_clut224()
393 unsigned int i, j; in write_logo_gray256() local
397 for (j = 0; j < logo_width; j++) in write_logo_gray256()
398 if (!is_gray(logo_data[i][j])) in write_logo_gray256()
406 for (j = 0; j < logo_width; j++) in write_logo_gray256()
407 write_hex(logo_data[i][j].red); in write_logo_gray256()
430 " -h : display this usage information\n" in usage()
431 " -n <name> : specify logo name (default: linux_logo)\n" in usage()
432 " -o <output> : output to file <output> instead of stdout\n" in usage()
433 " -t <type> : specify logo type, one of\n" in usage()
450 if (opt == -1) in main()
484 if (optind != argc-1) in main()