Lines Matching refs:result

71 	struct gfxinfo *result = NULL;  in php_handle_gif()  local
80 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_gif()
81 result->width = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8); in php_handle_gif()
82 result->height = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8); in php_handle_gif()
83 result->bits = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0; in php_handle_gif()
84 result->channels = 3; /* always */ in php_handle_gif()
86 return result; in php_handle_gif()
93 struct gfxinfo *result = NULL; in php_handle_psd() local
102 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_psd()
103result->height = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned … in php_handle_psd()
104result->width = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned … in php_handle_psd()
106 return result; in php_handle_psd()
113 struct gfxinfo *result = NULL; in php_handle_bmp() local
125 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
126 result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]); in php_handle_bmp()
127 result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]); in php_handle_bmp()
128 result->bits = ((unsigned int)dim[11]); in php_handle_bmp()
130 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
131result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigne… in php_handle_bmp()
132result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigne… in php_handle_bmp()
133 result->height = abs((int32_t)result->height); in php_handle_bmp()
134 result->bits = (((unsigned int)dim[15]) << 8) + ((unsigned int)dim[14]); in php_handle_bmp()
139 return result; in php_handle_bmp()
148 unsigned long int result = 0; in php_swf_get_bits() local
152 result = result + in php_swf_get_bits()
155 return result; in php_swf_get_bits()
163 struct gfxinfo *result = NULL; in php_handle_swc() local
225 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swc()
227 result->width = (php_swf_get_bits (b, 5 + bits, bits) - in php_handle_swc()
229 result->height = (php_swf_get_bits (b, 5 + (3 * bits), bits) - in php_handle_swc()
232 result = NULL; in php_handle_swc()
236 return result; in php_handle_swc()
244 struct gfxinfo *result = NULL; in php_handle_swf() local
254 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swf()
256 result->width = (php_swf_get_bits (a, 5 + bits, bits) - in php_handle_swf()
258 result->height = (php_swf_get_bits (a, 5 + (3 * bits), bits) - in php_handle_swf()
260 result->bits = 0; in php_handle_swf()
261 result->channels = 0; in php_handle_swf()
262 return result; in php_handle_swf()
270 struct gfxinfo *result = NULL; in php_handle_png() local
287 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_png()
288result->width = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned int… in php_handle_png()
289result->height = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned int… in php_handle_png()
290 result->bits = (unsigned int)dim[8]; in php_handle_png()
291 return result; in php_handle_png()
448 struct gfxinfo *result = NULL; in php_handle_jpeg() local
469 if (result == NULL) { in php_handle_jpeg()
471 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpeg()
473 result->bits = php_stream_getc(stream); in php_handle_jpeg()
474 result->height = php_read2(stream); in php_handle_jpeg()
475 result->width = php_read2(stream); in php_handle_jpeg()
476 result->channels = php_stream_getc(stream); in php_handle_jpeg()
478 return result; in php_handle_jpeg()
481 return result; in php_handle_jpeg()
485 return result; in php_handle_jpeg()
508 return result; in php_handle_jpeg()
512 return result; in php_handle_jpeg()
519 return result; /* we're about to hit image data, or are at EOF. stop processing. */ in php_handle_jpeg()
523 return result; in php_handle_jpeg()
529 return result; /* perhaps image broken -> no info but size */ in php_handle_jpeg()
576 struct gfxinfo *result = NULL; in php_handle_jpc() local
597 result = (struct gfxinfo *)ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpc()
601 result->width = php_read4(stream); /* Xsiz */ in php_handle_jpc()
602 result->height = php_read4(stream); /* Ysiz */ in php_handle_jpc()
613 efree(result); in php_handle_jpc()
618 result->channels = php_read2(stream); /* Csiz */ in php_handle_jpc()
619 if ((result->channels == 0 && php_stream_eof(stream)) || result->channels > 256) { in php_handle_jpc()
620 efree(result); in php_handle_jpc()
626 for (i = 0; i < result->channels; i++) { in php_handle_jpc()
637 result->bits = highest_bit_depth; in php_handle_jpc()
639 return result; in php_handle_jpc()
647 struct gfxinfo *result = NULL; in php_handle_jp2() local
680 result = php_handle_jpc(stream); in php_handle_jp2()
695 if (result == NULL) { in php_handle_jp2()
699 return result; in php_handle_jp2()
773 struct gfxinfo *result = NULL; in php_handle_tiff() local
839 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_tiff()
840 result->height = height; in php_handle_tiff()
841 result->width = width; in php_handle_tiff()
842 result->bits = 0; in php_handle_tiff()
843 result->channels = 0; in php_handle_tiff()
844 return result; in php_handle_tiff()
853 struct gfxinfo * result; in php_handle_iff() local
887 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_iff()
888 result->width = width; in php_handle_iff()
889 result->height = height; in php_handle_iff()
890 result->bits = bits; in php_handle_iff()
891 result->channels = 0; in php_handle_iff()
892 return result; in php_handle_iff()
912 static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) in php_get_wbmp() argument
964 (*result)->width = width; in php_get_wbmp()
965 (*result)->height = height; in php_get_wbmp()
975 struct gfxinfo *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_wbmp() local
977 if (!php_get_wbmp(stream, &result, 0)) { in php_handle_wbmp()
978 efree(result); in php_handle_wbmp()
982 return result; in php_handle_wbmp()
987 static int php_get_xbm(php_stream *stream, struct gfxinfo **result) in php_get_xbm() argument
995 if (result) { in php_get_xbm()
996 *result = NULL; in php_get_xbm()
1033 if (result) { in php_get_xbm()
1034 *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_get_xbm()
1035 (*result)->width = width; in php_get_xbm()
1036 (*result)->height = height; in php_get_xbm()
1048 struct gfxinfo *result; in php_handle_xbm() local
1049 php_get_xbm(stream, &result); in php_handle_xbm()
1050 return result; in php_handle_xbm()
1057 struct gfxinfo *result = NULL; in php_handle_ico() local
1069 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_ico()
1076 if ((((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]) >= result->bits) in php_handle_ico()
1078 result->width = (unsigned int)dim[0]; in php_handle_ico()
1079 result->height = (unsigned int)dim[1]; in php_handle_ico()
1080 result->bits = (((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]); in php_handle_ico()
1085 if (0 == result->width) in php_handle_ico()
1086 result->width = 256; in php_handle_ico()
1088 if (0 == result->height) in php_handle_ico()
1089 result->height = 256; in php_handle_ico()
1091 return result; in php_handle_ico()
1098 struct gfxinfo *result = NULL; in php_handle_webp() local
1119 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_webp()
1123 result->width = buf[14] + ((buf[15] & 0x3F) << 8); in php_handle_webp()
1124 result->height = buf[16] + ((buf[17] & 0x3F) << 8); in php_handle_webp()
1127 result->width = buf[9] + ((buf[10] & 0x3F) << 8) + 1; in php_handle_webp()
1128 result->height = (buf[10] >> 6) + (buf[11] << 2) + ((buf[12] & 0xF) << 10) + 1; in php_handle_webp()
1131 result->width = buf[12] + (buf[13] << 8) + (buf[14] << 16) + 1; in php_handle_webp()
1132 result->height = buf[15] + (buf[16] << 8) + (buf[17] << 16) + 1; in php_handle_webp()
1135 result->bits = 8; /* always 1 byte */ in php_handle_webp()
1137 return result; in php_handle_webp()
1182 struct gfxinfo* result = NULL; in php_handle_avif() local
1188 result = (struct gfxinfo*)ecalloc(1, sizeof(struct gfxinfo)); in php_handle_avif()
1189 result->width = features.width; in php_handle_avif()
1190 result->height = features.height; in php_handle_avif()
1191 result->bits = features.bit_depth; in php_handle_avif()
1192 result->channels = features.num_channels; in php_handle_avif()
1194 return result; in php_handle_avif()
1446 struct gfxinfo *result = NULL; in php_getimagesize_from_stream() local
1455 result = php_handle_gif(stream); in php_getimagesize_from_stream()
1459 result = php_handle_jpeg(stream, info); in php_getimagesize_from_stream()
1461 result = php_handle_jpeg(stream, NULL); in php_getimagesize_from_stream()
1465 result = php_handle_png(stream); in php_getimagesize_from_stream()
1468 result = php_handle_swf(stream); in php_getimagesize_from_stream()
1472 result = php_handle_swc(stream); in php_getimagesize_from_stream()
1478 result = php_handle_psd(stream); in php_getimagesize_from_stream()
1481 result = php_handle_bmp(stream); in php_getimagesize_from_stream()
1484 result = php_handle_tiff(stream, NULL, 0); in php_getimagesize_from_stream()
1487 result = php_handle_tiff(stream, NULL, 1); in php_getimagesize_from_stream()
1490 result = php_handle_jpc(stream); in php_getimagesize_from_stream()
1493 result = php_handle_jp2(stream); in php_getimagesize_from_stream()
1496 result = php_handle_iff(stream); in php_getimagesize_from_stream()
1499 result = php_handle_wbmp(stream); in php_getimagesize_from_stream()
1502 result = php_handle_xbm(stream); in php_getimagesize_from_stream()
1505 result = php_handle_ico(stream); in php_getimagesize_from_stream()
1508 result = php_handle_webp(stream); in php_getimagesize_from_stream()
1511 result = php_handle_avif(stream); in php_getimagesize_from_stream()
1518 if (result) { in php_getimagesize_from_stream()
1521 add_index_long(return_value, 0, result->width); in php_getimagesize_from_stream()
1522 add_index_long(return_value, 1, result->height); in php_getimagesize_from_stream()
1524 snprintf(temp, sizeof(temp), "width=\"%d\" height=\"%d\"", result->width, result->height); in php_getimagesize_from_stream()
1527 if (result->bits != 0) { in php_getimagesize_from_stream()
1528 add_assoc_long(return_value, "bits", result->bits); in php_getimagesize_from_stream()
1530 if (result->channels != 0) { in php_getimagesize_from_stream()
1531 add_assoc_long(return_value, "channels", result->channels); in php_getimagesize_from_stream()
1534 efree(result); in php_getimagesize_from_stream()