Lines Matching refs:result

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