Lines Matching refs:result

102 	struct gfxinfo *result = NULL;  in php_handle_gif()  local
111 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_gif()
112 result->width = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8); in php_handle_gif()
113 result->height = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8); in php_handle_gif()
114 result->bits = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0; in php_handle_gif()
115 result->channels = 3; /* always */ in php_handle_gif()
117 return result; in php_handle_gif()
124 struct gfxinfo *result = NULL; in php_handle_psd() local
133 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_psd()
134result->height = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned … in php_handle_psd()
135result->width = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned … in php_handle_psd()
137 return result; in php_handle_psd()
144 struct gfxinfo *result = NULL; in php_handle_bmp() local
156 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
157 result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]); in php_handle_bmp()
158 result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]); in php_handle_bmp()
159 result->bits = ((unsigned int)dim[11]); in php_handle_bmp()
161 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
162result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigne… in php_handle_bmp()
163result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigne… in php_handle_bmp()
164 result->height = abs((int32_t)result->height); in php_handle_bmp()
165 result->bits = (((unsigned int)dim[15]) << 8) + ((unsigned int)dim[14]); in php_handle_bmp()
170 return result; in php_handle_bmp()
179 unsigned long int result = 0; in php_swf_get_bits() local
183 result = result + in php_swf_get_bits()
186 return result; in php_swf_get_bits()
194 struct gfxinfo *result = NULL; in php_handle_swc() local
256 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swc()
258 result->width = (php_swf_get_bits (b, 5 + bits, bits) - in php_handle_swc()
260 result->height = (php_swf_get_bits (b, 5 + (3 * bits), bits) - in php_handle_swc()
263 result = NULL; in php_handle_swc()
267 return result; in php_handle_swc()
275 struct gfxinfo *result = NULL; in php_handle_swf() local
285 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swf()
287 result->width = (php_swf_get_bits (a, 5 + bits, bits) - in php_handle_swf()
289 result->height = (php_swf_get_bits (a, 5 + (3 * bits), bits) - in php_handle_swf()
291 result->bits = 0; in php_handle_swf()
292 result->channels = 0; in php_handle_swf()
293 return result; in php_handle_swf()
301 struct gfxinfo *result = NULL; in php_handle_png() local
318 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_png()
319result->width = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned int… in php_handle_png()
320result->height = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned int… in php_handle_png()
321 result->bits = (unsigned int)dim[8]; in php_handle_png()
322 return result; in php_handle_png()
479 struct gfxinfo *result = NULL; in php_handle_jpeg() local
500 if (result == NULL) { in php_handle_jpeg()
502 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpeg()
504 result->bits = php_stream_getc(stream); in php_handle_jpeg()
505 result->height = php_read2(stream); in php_handle_jpeg()
506 result->width = php_read2(stream); in php_handle_jpeg()
507 result->channels = php_stream_getc(stream); in php_handle_jpeg()
509 return result; in php_handle_jpeg()
512 return result; in php_handle_jpeg()
516 return result; in php_handle_jpeg()
539 return result; in php_handle_jpeg()
543 return result; in php_handle_jpeg()
550 return result; /* we're about to hit image data, or are at EOF. stop processing. */ in php_handle_jpeg()
554 return result; in php_handle_jpeg()
560 return result; /* perhaps image broken -> no info but size */ in php_handle_jpeg()
607 struct gfxinfo *result = NULL; in php_handle_jpc() local
628 result = (struct gfxinfo *)ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpc()
632 result->width = php_read4(stream); /* Xsiz */ in php_handle_jpc()
633 result->height = php_read4(stream); /* Ysiz */ in php_handle_jpc()
644 efree(result); in php_handle_jpc()
649 result->channels = php_read2(stream); /* Csiz */ in php_handle_jpc()
650 if ((result->channels == 0 && php_stream_eof(stream)) || result->channels > 256) { in php_handle_jpc()
651 efree(result); in php_handle_jpc()
657 for (i = 0; i < result->channels; i++) { in php_handle_jpc()
668 result->bits = highest_bit_depth; in php_handle_jpc()
670 return result; in php_handle_jpc()
678 struct gfxinfo *result = NULL; in php_handle_jp2() local
711 result = php_handle_jpc(stream); in php_handle_jp2()
726 if (result == NULL) { in php_handle_jp2()
730 return result; in php_handle_jp2()
804 struct gfxinfo *result = NULL; in php_handle_tiff() local
870 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_tiff()
871 result->height = height; in php_handle_tiff()
872 result->width = width; in php_handle_tiff()
873 result->bits = 0; in php_handle_tiff()
874 result->channels = 0; in php_handle_tiff()
875 return result; in php_handle_tiff()
884 struct gfxinfo * result; in php_handle_iff() local
918 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_iff()
919 result->width = width; in php_handle_iff()
920 result->height = height; in php_handle_iff()
921 result->bits = bits; in php_handle_iff()
922 result->channels = 0; in php_handle_iff()
923 return result; in php_handle_iff()
943 static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) in php_get_wbmp() argument
995 (*result)->width = width; in php_get_wbmp()
996 (*result)->height = height; in php_get_wbmp()
1006 struct gfxinfo *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_wbmp() local
1008 if (!php_get_wbmp(stream, &result, 0)) { in php_handle_wbmp()
1009 efree(result); in php_handle_wbmp()
1013 return result; in php_handle_wbmp()
1018 static int php_get_xbm(php_stream *stream, struct gfxinfo **result) in php_get_xbm() argument
1026 if (result) { in php_get_xbm()
1027 *result = NULL; in php_get_xbm()
1064 if (result) { in php_get_xbm()
1065 *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_get_xbm()
1066 (*result)->width = width; in php_get_xbm()
1067 (*result)->height = height; in php_get_xbm()
1079 struct gfxinfo *result; in php_handle_xbm() local
1080 php_get_xbm(stream, &result); in php_handle_xbm()
1081 return result; in php_handle_xbm()
1088 struct gfxinfo *result = NULL; in php_handle_ico() local
1100 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_ico()
1107 if ((((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]) >= result->bits) in php_handle_ico()
1109 result->width = (unsigned int)dim[0]; in php_handle_ico()
1110 result->height = (unsigned int)dim[1]; in php_handle_ico()
1111 result->bits = (((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]); in php_handle_ico()
1116 if (0 == result->width) in php_handle_ico()
1117 result->width = 256; in php_handle_ico()
1119 if (0 == result->height) in php_handle_ico()
1120 result->height = 256; in php_handle_ico()
1122 return result; in php_handle_ico()
1129 struct gfxinfo *result = NULL; in php_handle_webp() local
1150 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_webp()
1154 result->width = buf[14] + ((buf[15] & 0x3F) << 8); in php_handle_webp()
1155 result->height = buf[16] + ((buf[17] & 0x3F) << 8); in php_handle_webp()
1158 result->width = buf[9] + ((buf[10] & 0x3F) << 8) + 1; in php_handle_webp()
1159 result->height = (buf[10] >> 6) + (buf[11] << 2) + ((buf[12] & 0xF) << 10) + 1; in php_handle_webp()
1162 result->width = buf[12] + (buf[13] << 8) + (buf[14] << 16) + 1; in php_handle_webp()
1163 result->height = buf[15] + (buf[16] << 8) + (buf[17] << 16) + 1; in php_handle_webp()
1166 result->bits = 8; /* always 1 byte */ in php_handle_webp()
1168 return result; in php_handle_webp()
1496 struct gfxinfo *result = NULL; in php_getimagesize_from_stream() local
1505 result = php_handle_gif(stream); in php_getimagesize_from_stream()
1509 result = php_handle_jpeg(stream, info); in php_getimagesize_from_stream()
1511 result = php_handle_jpeg(stream, NULL); in php_getimagesize_from_stream()
1515 result = php_handle_png(stream); in php_getimagesize_from_stream()
1518 result = php_handle_swf(stream); in php_getimagesize_from_stream()
1522 result = php_handle_swc(stream); in php_getimagesize_from_stream()
1528 result = php_handle_psd(stream); in php_getimagesize_from_stream()
1531 result = php_handle_bmp(stream); in php_getimagesize_from_stream()
1534 result = php_handle_tiff(stream, NULL, 0); in php_getimagesize_from_stream()
1537 result = php_handle_tiff(stream, NULL, 1); in php_getimagesize_from_stream()
1540 result = php_handle_jpc(stream); in php_getimagesize_from_stream()
1543 result = php_handle_jp2(stream); in php_getimagesize_from_stream()
1546 result = php_handle_iff(stream); in php_getimagesize_from_stream()
1549 result = php_handle_wbmp(stream); in php_getimagesize_from_stream()
1552 result = php_handle_xbm(stream); in php_getimagesize_from_stream()
1555 result = php_handle_ico(stream); in php_getimagesize_from_stream()
1558 result = php_handle_webp(stream); in php_getimagesize_from_stream()
1561 result = php_handle_avif(stream); in php_getimagesize_from_stream()
1568 if (result) { in php_getimagesize_from_stream()
1571 add_index_long(return_value, 0, result->width); in php_getimagesize_from_stream()
1572 add_index_long(return_value, 1, result->height); in php_getimagesize_from_stream()
1574 snprintf(temp, sizeof(temp), "width=\"%d\" height=\"%d\"", result->width, result->height); in php_getimagesize_from_stream()
1577 if (result->bits != 0) { in php_getimagesize_from_stream()
1578 add_assoc_long(return_value, "bits", result->bits); in php_getimagesize_from_stream()
1580 if (result->channels != 0) { in php_getimagesize_from_stream()
1581 add_assoc_long(return_value, "channels", result->channels); in php_getimagesize_from_stream()
1584 efree(result); in php_getimagesize_from_stream()