Lines Matching refs:result

108 	struct gfxinfo *result = NULL;  in php_handle_gif()  local
117 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_gif()
118 result->width = (unsigned int)dim[0] | (((unsigned int)dim[1])<<8); in php_handle_gif()
119 result->height = (unsigned int)dim[2] | (((unsigned int)dim[3])<<8); in php_handle_gif()
120 result->bits = dim[4]&0x80 ? ((((unsigned int)dim[4])&0x07) + 1) : 0; in php_handle_gif()
121 result->channels = 3; /* always */ in php_handle_gif()
123 return result; in php_handle_gif()
131 struct gfxinfo *result = NULL; in php_handle_psd() local
140 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_psd()
141result->height = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned … in php_handle_psd()
142result->width = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned … in php_handle_psd()
144 return result; in php_handle_psd()
152 struct gfxinfo *result = NULL; in php_handle_bmp() local
164 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
165 result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]); in php_handle_bmp()
166 result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]); in php_handle_bmp()
167 result->bits = ((unsigned int)dim[11]); in php_handle_bmp()
169 result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo)); in php_handle_bmp()
170result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigne… in php_handle_bmp()
171result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigne… in php_handle_bmp()
172 result->height = abs((int32_t)result->height); in php_handle_bmp()
173 result->bits = (((unsigned int)dim[15]) << 8) + ((unsigned int)dim[14]); in php_handle_bmp()
178 return result; in php_handle_bmp()
187 unsigned long int result = 0; in php_swf_get_bits() local
191 result = result + in php_swf_get_bits()
194 return result; in php_swf_get_bits()
203 struct gfxinfo *result = NULL; in php_handle_swc() local
265 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swc()
267 result->width = (php_swf_get_bits (b, 5 + bits, bits) - in php_handle_swc()
269 result->height = (php_swf_get_bits (b, 5 + (3 * bits), bits) - in php_handle_swc()
272 result = NULL; in php_handle_swc()
276 return result; in php_handle_swc()
285 struct gfxinfo *result = NULL; in php_handle_swf() local
295 result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo)); in php_handle_swf()
297 result->width = (php_swf_get_bits (a, 5 + bits, bits) - in php_handle_swf()
299 result->height = (php_swf_get_bits (a, 5 + (3 * bits), bits) - in php_handle_swf()
301 result->bits = 0; in php_handle_swf()
302 result->channels = 0; in php_handle_swf()
303 return result; in php_handle_swf()
311 struct gfxinfo *result = NULL; in php_handle_png() local
328 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_png()
329result->width = (((unsigned int)dim[0]) << 24) + (((unsigned int)dim[1]) << 16) + (((unsigned int… in php_handle_png()
330result->height = (((unsigned int)dim[4]) << 24) + (((unsigned int)dim[5]) << 16) + (((unsigned int… in php_handle_png()
331 result->bits = (unsigned int)dim[8]; in php_handle_png()
332 return result; in php_handle_png()
477 struct gfxinfo *result = NULL; in php_handle_jpeg() local
498 if (result == NULL) { in php_handle_jpeg()
500 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpeg()
502 result->bits = php_stream_getc(stream); in php_handle_jpeg()
503 result->height = php_read2(stream); in php_handle_jpeg()
504 result->width = php_read2(stream); in php_handle_jpeg()
505 result->channels = php_stream_getc(stream); in php_handle_jpeg()
507 return result; in php_handle_jpeg()
510 return result; in php_handle_jpeg()
514 return result; in php_handle_jpeg()
537 return result; in php_handle_jpeg()
541 return result; in php_handle_jpeg()
548 return result; /* we're about to hit image data, or are at EOF. stop processing. */ in php_handle_jpeg()
552 return result; in php_handle_jpeg()
558 return result; /* perhaps image broken -> no info but size */ in php_handle_jpeg()
606 struct gfxinfo *result = NULL; in php_handle_jpc() local
627 result = (struct gfxinfo *)ecalloc(1, sizeof(struct gfxinfo)); in php_handle_jpc()
631 result->width = php_read4(stream); /* Xsiz */ in php_handle_jpc()
632 result->height = php_read4(stream); /* Ysiz */ in php_handle_jpc()
643 efree(result); in php_handle_jpc()
648 result->channels = php_read2(stream); /* Csiz */ in php_handle_jpc()
649 if ((result->channels == 0 && php_stream_eof(stream)) || result->channels > 256) { in php_handle_jpc()
650 efree(result); in php_handle_jpc()
656 for (i = 0; i < result->channels; i++) { in php_handle_jpc()
667 result->bits = highest_bit_depth; in php_handle_jpc()
669 return result; in php_handle_jpc()
677 struct gfxinfo *result = NULL; in php_handle_jp2() local
710 result = php_handle_jpc(stream); in php_handle_jp2()
725 if (result == NULL) { in php_handle_jp2()
729 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()
885 struct gfxinfo * result; in php_handle_iff() local
919 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_iff()
920 result->width = width; in php_handle_iff()
921 result->height = height; in php_handle_iff()
922 result->bits = bits; in php_handle_iff()
923 result->channels = 0; in php_handle_iff()
924 return result; in php_handle_iff()
944 static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check) in php_get_wbmp() argument
996 (*result)->width = width; in php_get_wbmp()
997 (*result)->height = height; in php_get_wbmp()
1008 struct gfxinfo *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_wbmp() local
1010 if (!php_get_wbmp(stream, &result, 0)) { in php_handle_wbmp()
1011 efree(result); in php_handle_wbmp()
1015 return result; in php_handle_wbmp()
1021 static int php_get_xbm(php_stream *stream, struct gfxinfo **result) in php_get_xbm() argument
1029 if (result) { in php_get_xbm()
1030 *result = NULL; in php_get_xbm()
1067 if (result) { in php_get_xbm()
1068 *result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_get_xbm()
1069 (*result)->width = width; in php_get_xbm()
1070 (*result)->height = height; in php_get_xbm()
1083 struct gfxinfo *result; in php_handle_xbm() local
1084 php_get_xbm(stream, &result); in php_handle_xbm()
1085 return result; in php_handle_xbm()
1093 struct gfxinfo *result = NULL; in php_handle_ico() local
1105 result = (struct gfxinfo *) ecalloc(1, sizeof(struct gfxinfo)); in php_handle_ico()
1112 if ((((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]) >= result->bits) in php_handle_ico()
1114 result->width = (unsigned int)dim[0]; in php_handle_ico()
1115 result->height = (unsigned int)dim[1]; in php_handle_ico()
1116 result->bits = (((unsigned int)dim[7]) << 8) + ((unsigned int)dim[6]); in php_handle_ico()
1121 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()
1371 struct gfxinfo *result = NULL; in php_getimagesize_from_stream() local
1380 result = php_handle_gif(stream); in php_getimagesize_from_stream()
1384 result = php_handle_jpeg(stream, info); in php_getimagesize_from_stream()
1386 result = php_handle_jpeg(stream, NULL); in php_getimagesize_from_stream()
1390 result = php_handle_png(stream); in php_getimagesize_from_stream()
1393 result = php_handle_swf(stream); in php_getimagesize_from_stream()
1397 result = php_handle_swc(stream); in php_getimagesize_from_stream()
1403 result = php_handle_psd(stream); in php_getimagesize_from_stream()
1406 result = php_handle_bmp(stream); in php_getimagesize_from_stream()
1409 result = php_handle_tiff(stream, NULL, 0); in php_getimagesize_from_stream()
1412 result = php_handle_tiff(stream, NULL, 1); in php_getimagesize_from_stream()
1415 result = php_handle_jpc(stream); in php_getimagesize_from_stream()
1418 result = php_handle_jp2(stream); in php_getimagesize_from_stream()
1421 result = php_handle_iff(stream); in php_getimagesize_from_stream()
1424 result = php_handle_wbmp(stream); in php_getimagesize_from_stream()
1427 result = php_handle_xbm(stream); in php_getimagesize_from_stream()
1430 result = php_handle_ico(stream); in php_getimagesize_from_stream()
1433 result = php_handle_webp(stream); in php_getimagesize_from_stream()
1440 if (result) { in php_getimagesize_from_stream()
1443 add_index_long(return_value, 0, result->width); in php_getimagesize_from_stream()
1444 add_index_long(return_value, 1, result->height); in php_getimagesize_from_stream()
1446 snprintf(temp, sizeof(temp), "width=\"%d\" height=\"%d\"", result->width, result->height); in php_getimagesize_from_stream()
1449 if (result->bits != 0) { in php_getimagesize_from_stream()
1450 add_assoc_long(return_value, "bits", result->bits); in php_getimagesize_from_stream()
1452 if (result->channels != 0) { in php_getimagesize_from_stream()
1453 add_assoc_long(return_value, "channels", result->channels); in php_getimagesize_from_stream()
1456 efree(result); in php_getimagesize_from_stream()