Lines Matching refs:result

106 	struct gfxinfo *result = NULL;  in php_handle_gif()  local
115 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_gif()
116 result->width = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8); in php_handle_gif()
117 result->height = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8); in php_handle_gif()
118 result->bits = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0; in php_handle_gif()
119 result->channels = 3; /* always */ in php_handle_gif()
121 return result; in php_handle_gif()
129 struct gfxinfo *result = NULL; in php_handle_psd() local
138 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_psd()
139result->height = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned … in php_handle_psd()
140result->width = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned … in php_handle_psd()
142 return result; in php_handle_psd()
150 struct gfxinfo *result = NULL; in php_handle_bmp() local
162 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
163 result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]); in php_handle_bmp()
164 result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]); in php_handle_bmp()
165 result->bits = ((unsigned int)dim[11]); in php_handle_bmp()
167 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
168result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigne… in php_handle_bmp()
169result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigne… in php_handle_bmp()
170 result->height = abs((int32_t)result->height); in php_handle_bmp()
171 result->bits = (((unsigned int)dim[15]) << 8) + ((unsigned int)dim[14]); in php_handle_bmp()
176 return result; in php_handle_bmp()
185 unsigned long int result = 0; in php_swf_get_bits() local
189 result = result + in php_swf_get_bits()
192 return result; in php_swf_get_bits()
201 struct gfxinfo *result = NULL; in php_handle_swc() local
263 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swc()
265 result->width = (php_swf_get_bits (b, 5 + bits, bits) - in php_handle_swc()
267 result->height = (php_swf_get_bits (b, 5 + (3 * bits), bits) - in php_handle_swc()
270 result = NULL; in php_handle_swc()
274 return result; in php_handle_swc()
283 struct gfxinfo *result = NULL; in php_handle_swf() local
293 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swf()
295 result->width = (php_swf_get_bits (a, 5 + bits, bits) - in php_handle_swf()
297 result->height = (php_swf_get_bits (a, 5 + (3 * bits), bits) - in php_handle_swf()
299 result->bits = 0; in php_handle_swf()
300 result->channels = 0; in php_handle_swf()
301 return result; in php_handle_swf()
309 struct gfxinfo *result = NULL; in php_handle_png() local
326 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_png()
327result->width = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned int… in php_handle_png()
328result->height = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned int… in php_handle_png()
329 result->bits = (unsigned int)dim[8]; in php_handle_png()
330 return result; in php_handle_png()
475 struct gfxinfo *result = NULL; in php_handle_jpeg() local
496 if (result == NULL) { in php_handle_jpeg()
498 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpeg()
500 result->bits = php_stream_getc(stream); in php_handle_jpeg()
501 result->height = php_read2(stream); in php_handle_jpeg()
502 result->width = php_read2(stream); in php_handle_jpeg()
503 result->channels = php_stream_getc(stream); in php_handle_jpeg()
505 return result; in php_handle_jpeg()
508 return result; in php_handle_jpeg()
512 return result; in php_handle_jpeg()
535 return result; in php_handle_jpeg()
539 return result; in php_handle_jpeg()
546 return result; /* we're about to hit image data, or are at EOF. stop processing. */ in php_handle_jpeg()
550 return result; in php_handle_jpeg()
556 return result; /* perhaps image broken -> no info but size */ in php_handle_jpeg()
604 struct gfxinfo *result = NULL; in php_handle_jpc() local
625 result = (struct gfxinfo *)ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpc()
629 result->width = php_read4(stream); /* Xsiz */ in php_handle_jpc()
630 result->height = php_read4(stream); /* Ysiz */ in php_handle_jpc()
641 efree(result); in php_handle_jpc()
646 result->channels = php_read2(stream); /* Csiz */ in php_handle_jpc()
647 if ((result->channels == 0 && php_stream_eof(stream)) || result->channels > 256) { in php_handle_jpc()
648 efree(result); in php_handle_jpc()
654 for (i = 0; i < result->channels; i++) { in php_handle_jpc()
665 result->bits = highest_bit_depth; in php_handle_jpc()
667 return result; in php_handle_jpc()
675 struct gfxinfo *result = NULL; in php_handle_jp2() local
708 result = php_handle_jpc(stream); in php_handle_jp2()
723 if (result == NULL) { in php_handle_jp2()
727 return result; in php_handle_jp2()
802 struct gfxinfo *result = NULL; in php_handle_tiff() local
868 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_tiff()
869 result->height = height; in php_handle_tiff()
870 result->width = width; in php_handle_tiff()
871 result->bits = 0; in php_handle_tiff()
872 result->channels = 0; in php_handle_tiff()
873 return result; in php_handle_tiff()
883 struct gfxinfo * result; in php_handle_iff() local
917 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_iff()
918 result->width = width; in php_handle_iff()
919 result->height = height; in php_handle_iff()
920 result->bits = bits; in php_handle_iff()
921 result->channels = 0; in php_handle_iff()
922 return result; in php_handle_iff()
942 static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) in php_get_wbmp() argument
994 (*result)->width = width; in php_get_wbmp()
995 (*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()
1019 static int php_get_xbm(php_stream *stream, struct gfxinfo **result) in php_get_xbm() argument
1027 if (result) { in php_get_xbm()
1028 *result = NULL; in php_get_xbm()
1065 if (result) { in php_get_xbm()
1066 *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_get_xbm()
1067 (*result)->width = width; in php_get_xbm()
1068 (*result)->height = height; in php_get_xbm()
1081 struct gfxinfo *result; in php_handle_xbm() local
1082 php_get_xbm(stream, &result); in php_handle_xbm()
1083 return result; in php_handle_xbm()
1091 struct gfxinfo *result = NULL; in php_handle_ico() local
1103 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_ico()
1110 if ((((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]) >= result->bits) in php_handle_ico()
1112 result->width = (unsigned int)dim[0]; in php_handle_ico()
1113 result->height = (unsigned int)dim[1]; in php_handle_ico()
1114 result->bits = (((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]); in php_handle_ico()
1119 if (0 == result->width) in php_handle_ico()
1120 result->width = 256; in php_handle_ico()
1122 if (0 == result->height) in php_handle_ico()
1123 result->height = 256; in php_handle_ico()
1125 return result; in php_handle_ico()
1133 struct gfxinfo *result = NULL; in php_handle_webp() local
1154 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_webp()
1158 result->width = buf[14] + ((buf[15] & 0x3F) << 8); in php_handle_webp()
1159 result->height = buf[16] + ((buf[17] & 0x3F) << 8); in php_handle_webp()
1162 result->width = buf[9] + ((buf[10] & 0x3F) << 8) + 1; in php_handle_webp()
1163 result->height = (buf[10] >> 6) + (buf[11] << 2) + ((buf[12] & 0xF) << 10) + 1; in php_handle_webp()
1166 result->width = buf[12] + (buf[13] << 8) + (buf[14] << 16) + 1; in php_handle_webp()
1167 result->height = buf[15] + (buf[16] << 8) + (buf[17] << 16) + 1; in php_handle_webp()
1170 result->bits = 8; /* always 1 byte */ in php_handle_webp()
1172 return result; in php_handle_webp()
1397 struct gfxinfo *result = NULL; in php_getimagesize_from_stream() local
1406 result = php_handle_gif(stream); in php_getimagesize_from_stream()
1410 result = php_handle_jpeg(stream, info); in php_getimagesize_from_stream()
1412 result = php_handle_jpeg(stream, NULL); in php_getimagesize_from_stream()
1416 result = php_handle_png(stream); in php_getimagesize_from_stream()
1419 result = php_handle_swf(stream); in php_getimagesize_from_stream()
1423 result = php_handle_swc(stream); in php_getimagesize_from_stream()
1429 result = php_handle_psd(stream); in php_getimagesize_from_stream()
1432 result = php_handle_bmp(stream); in php_getimagesize_from_stream()
1435 result = php_handle_tiff(stream, NULL, 0); in php_getimagesize_from_stream()
1438 result = php_handle_tiff(stream, NULL, 1); in php_getimagesize_from_stream()
1441 result = php_handle_jpc(stream); in php_getimagesize_from_stream()
1444 result = php_handle_jp2(stream); in php_getimagesize_from_stream()
1447 result = php_handle_iff(stream); in php_getimagesize_from_stream()
1450 result = php_handle_wbmp(stream); in php_getimagesize_from_stream()
1453 result = php_handle_xbm(stream); in php_getimagesize_from_stream()
1456 result = php_handle_ico(stream); in php_getimagesize_from_stream()
1459 result = php_handle_webp(stream); in php_getimagesize_from_stream()
1466 if (result) { in php_getimagesize_from_stream()
1469 add_index_long(return_value, 0, result->width); in php_getimagesize_from_stream()
1470 add_index_long(return_value, 1, result->height); in php_getimagesize_from_stream()
1472 snprintf(temp, sizeof(temp), "width=\"%d\" height=\"%d\"", result->width, result->height); in php_getimagesize_from_stream()
1475 if (result->bits != 0) { in php_getimagesize_from_stream()
1476 add_assoc_long(return_value, "bits", result->bits); in php_getimagesize_from_stream()
1478 if (result->channels != 0) { in php_getimagesize_from_stream()
1479 add_assoc_long(return_value, "channels", result->channels); in php_getimagesize_from_stream()
1482 efree(result); in php_getimagesize_from_stream()