Lines Matching refs:viff_info

254     viff_info;  in ReadVIFFImage()  local
276 count=ReadBlob(image,1,&viff_info.identifier); in ReadVIFFImage()
282 if ((count != 1) || ((unsigned char) viff_info.identifier != 0xab)) in ReadVIFFImage()
287 (void) ReadBlob(image,sizeof(viff_info.file_type),&viff_info.file_type); in ReadVIFFImage()
288 (void) ReadBlob(image,sizeof(viff_info.release),&viff_info.release); in ReadVIFFImage()
289 (void) ReadBlob(image,sizeof(viff_info.version),&viff_info.version); in ReadVIFFImage()
290 (void) ReadBlob(image,sizeof(viff_info.machine_dependency), in ReadVIFFImage()
291 &viff_info.machine_dependency); in ReadVIFFImage()
292 (void) ReadBlob(image,sizeof(viff_info.reserve),viff_info.reserve); in ReadVIFFImage()
293 count=ReadBlob(image,512,(unsigned char *) viff_info.comment); in ReadVIFFImage()
296 viff_info.comment[511]='\0'; in ReadVIFFImage()
297 if (strlen(viff_info.comment) > 4) in ReadVIFFImage()
298 (void) SetImageProperty(image,"comment",viff_info.comment,exception); in ReadVIFFImage()
299 if ((viff_info.machine_dependency == VFF_DEP_DECORDER) || in ReadVIFFImage()
300 (viff_info.machine_dependency == VFF_DEP_NSORDER)) in ReadVIFFImage()
304 viff_info.rows=ReadBlobLong(image); in ReadVIFFImage()
305 viff_info.columns=ReadBlobLong(image); in ReadVIFFImage()
306 viff_info.subrows=ReadBlobLong(image); in ReadVIFFImage()
307 viff_info.x_offset=ReadBlobSignedLong(image); in ReadVIFFImage()
308 viff_info.y_offset=ReadBlobSignedLong(image); in ReadVIFFImage()
309 viff_info.x_bits_per_pixel=(float) ReadBlobLong(image); in ReadVIFFImage()
310 viff_info.y_bits_per_pixel=(float) ReadBlobLong(image); in ReadVIFFImage()
311 viff_info.location_type=ReadBlobLong(image); in ReadVIFFImage()
312 viff_info.location_dimension=ReadBlobLong(image); in ReadVIFFImage()
313 viff_info.number_of_images=ReadBlobLong(image); in ReadVIFFImage()
314 viff_info.number_data_bands=ReadBlobLong(image); in ReadVIFFImage()
315 viff_info.data_storage_type=ReadBlobLong(image); in ReadVIFFImage()
316 viff_info.data_encode_scheme=ReadBlobLong(image); in ReadVIFFImage()
317 viff_info.map_scheme=ReadBlobLong(image); in ReadVIFFImage()
318 viff_info.map_storage_type=ReadBlobLong(image); in ReadVIFFImage()
319 viff_info.map_rows=ReadBlobLong(image); in ReadVIFFImage()
320 viff_info.map_columns=ReadBlobLong(image); in ReadVIFFImage()
321 viff_info.map_subrows=ReadBlobLong(image); in ReadVIFFImage()
322 viff_info.map_enable=ReadBlobLong(image); in ReadVIFFImage()
323 viff_info.maps_per_cycle=ReadBlobLong(image); in ReadVIFFImage()
324 viff_info.color_space_model=ReadBlobLong(image); in ReadVIFFImage()
329 number_pixels=(MagickSizeType) viff_info.columns*viff_info.rows; in ReadVIFFImage()
336 image->columns=viff_info.rows; in ReadVIFFImage()
337 image->rows=viff_info.columns; in ReadVIFFImage()
338 image->depth=viff_info.x_bits_per_pixel <= 8 ? 8UL : in ReadVIFFImage()
340 image->alpha_trait=viff_info.number_data_bands == 4 ? BlendPixelTrait : in ReadVIFFImage()
349 if ((viff_info.number_data_bands < 1) || (viff_info.number_data_bands > 4)) in ReadVIFFImage()
351 if ((viff_info.data_storage_type != VFF_TYP_BIT) && in ReadVIFFImage()
352 (viff_info.data_storage_type != VFF_TYP_1_BYTE) && in ReadVIFFImage()
353 (viff_info.data_storage_type != VFF_TYP_2_BYTE) && in ReadVIFFImage()
354 (viff_info.data_storage_type != VFF_TYP_4_BYTE) && in ReadVIFFImage()
355 (viff_info.data_storage_type != VFF_TYP_FLOAT) && in ReadVIFFImage()
356 (viff_info.data_storage_type != VFF_TYP_DOUBLE)) in ReadVIFFImage()
358 if (viff_info.data_encode_scheme != VFF_DES_RAW) in ReadVIFFImage()
360 if ((viff_info.map_storage_type != VFF_MAPTYP_NONE) && in ReadVIFFImage()
361 (viff_info.map_storage_type != VFF_MAPTYP_1_BYTE) && in ReadVIFFImage()
362 (viff_info.map_storage_type != VFF_MAPTYP_2_BYTE) && in ReadVIFFImage()
363 (viff_info.map_storage_type != VFF_MAPTYP_4_BYTE) && in ReadVIFFImage()
364 (viff_info.map_storage_type != VFF_MAPTYP_FLOAT) && in ReadVIFFImage()
365 (viff_info.map_storage_type != VFF_MAPTYP_DOUBLE)) in ReadVIFFImage()
367 if ((viff_info.color_space_model != VFF_CM_NONE) && in ReadVIFFImage()
368 (viff_info.color_space_model != VFF_CM_ntscRGB) && in ReadVIFFImage()
369 (viff_info.color_space_model != VFF_CM_genericRGB)) in ReadVIFFImage()
371 if (viff_info.location_type != VFF_LOC_IMPLICIT) in ReadVIFFImage()
373 if (viff_info.number_of_images != 1) in ReadVIFFImage()
375 if (viff_info.map_rows == 0) in ReadVIFFImage()
376 viff_info.map_scheme=VFF_MS_NONE; in ReadVIFFImage()
377 switch ((int) viff_info.map_scheme) in ReadVIFFImage()
381 if (viff_info.number_data_bands < 3) in ReadVIFFImage()
386 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
389 if (viff_info.data_storage_type == VFF_MAPTYP_1_BYTE) in ReadVIFFImage()
408 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
417 image->colors=viff_info.map_columns; in ReadVIFFImage()
418 if ((MagickSizeType) (viff_info.map_rows*image->colors) > GetBlobSize(image)) in ReadVIFFImage()
422 if ((MagickSizeType) viff_info.map_rows > GetBlobSize(image)) in ReadVIFFImage()
424 if ((MagickSizeType) viff_info.map_rows > in ReadVIFFImage()
425 (viff_info.map_rows*bytes_per_pixel*sizeof(*viff_colormap))) in ReadVIFFImage()
428 viff_info.map_rows*bytes_per_pixel*sizeof(*viff_colormap)); in ReadVIFFImage()
434 count=ReadBlob(image,bytes_per_pixel*image->colors*viff_info.map_rows, in ReadVIFFImage()
438 ((viff_info.machine_dependency != VFF_DEP_DECORDER) && in ReadVIFFImage()
439 (viff_info.machine_dependency != VFF_DEP_NSORDER))) in ReadVIFFImage()
440 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
445 viff_info.map_rows)); in ReadVIFFImage()
452 viff_info.map_rows)); in ReadVIFFImage()
457 for (i=0; i < (ssize_t) (viff_info.map_rows*image->colors); i++) in ReadVIFFImage()
459 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
494 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
507 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
515 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
522 …if (HeapOverflowSanityCheckGetSize((size_t) number_pixels,viff_info.number_data_bands,&max_packets… in ReadVIFFImage()
536 ((viff_info.machine_dependency != VFF_DEP_DECORDER) && in ReadVIFFImage()
537 (viff_info.machine_dependency != VFF_DEP_NSORDER))) in ReadVIFFImage()
538 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
555 if ((viff_info.data_storage_type != VFF_TYP_1_BYTE) && in ReadVIFFImage()
556 (viff_info.map_scheme == VFF_MS_NONE)) in ReadVIFFImage()
564 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
576 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
607 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
615 if (viff_info.map_scheme == VFF_MS_NONE) in ReadVIFFImage()
631 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
764 count=ReadBlob(image,1,&viff_info.identifier); in ReadVIFFImage()
765 if ((count == 1) && (viff_info.identifier == 0xab)) in ReadVIFFImage()
782 } while ((count != 0) && (viff_info.identifier == 0xab)); in ReadVIFFImage()
975 viff_info; in WriteVIFFImage() local
991 (void) memset(&viff_info,0,sizeof(ViffInfo)); in WriteVIFFImage()
1000 viff_info.identifier=(char) -85; in WriteVIFFImage()
1001 viff_info.file_type=1; in WriteVIFFImage()
1002 viff_info.release=1; in WriteVIFFImage()
1003 viff_info.version=3; in WriteVIFFImage()
1004 viff_info.machine_dependency=VFF_DEP_IEEEORDER; /* IEEE byte ordering */ in WriteVIFFImage()
1005 *viff_info.comment='\0'; in WriteVIFFImage()
1008 (void) CopyMagickString(viff_info.comment,value,MagickMin(strlen(value), in WriteVIFFImage()
1010 viff_info.rows=image->columns; in WriteVIFFImage()
1011 viff_info.columns=image->rows; in WriteVIFFImage()
1012 viff_info.subrows=0; in WriteVIFFImage()
1013 viff_info.x_offset=(~0); in WriteVIFFImage()
1014 viff_info.y_offset=(~0); in WriteVIFFImage()
1015 viff_info.x_bits_per_pixel=0; in WriteVIFFImage()
1016 viff_info.y_bits_per_pixel=0; in WriteVIFFImage()
1017 viff_info.location_type=VFF_LOC_IMPLICIT; in WriteVIFFImage()
1018 viff_info.location_dimension=0; in WriteVIFFImage()
1019 viff_info.number_of_images=1; in WriteVIFFImage()
1020 viff_info.data_encode_scheme=VFF_DES_RAW; in WriteVIFFImage()
1021 viff_info.map_scheme=VFF_MS_NONE; in WriteVIFFImage()
1022 viff_info.map_storage_type=VFF_MAPTYP_NONE; in WriteVIFFImage()
1023 viff_info.map_rows=0; in WriteVIFFImage()
1024 viff_info.map_columns=0; in WriteVIFFImage()
1025 viff_info.map_subrows=0; in WriteVIFFImage()
1026 viff_info.map_enable=1; /* no colormap */ in WriteVIFFImage()
1027 viff_info.maps_per_cycle=0; in WriteVIFFImage()
1034 viff_info.number_data_bands=image->alpha_trait ? 4U : 3U; in WriteVIFFImage()
1035 viff_info.color_space_model=VFF_CM_genericRGB; in WriteVIFFImage()
1036 viff_info.data_storage_type=VFF_TYP_1_BYTE; in WriteVIFFImage()
1037 packets=viff_info.number_data_bands*number_pixels; in WriteVIFFImage()
1041 viff_info.number_data_bands=1; in WriteVIFFImage()
1042 viff_info.color_space_model=VFF_CM_NONE; in WriteVIFFImage()
1043 viff_info.data_storage_type=VFF_TYP_1_BYTE; in WriteVIFFImage()
1050 viff_info.map_scheme=VFF_MS_ONEPERBAND; in WriteVIFFImage()
1051 viff_info.map_storage_type=VFF_MAPTYP_1_BYTE; in WriteVIFFImage()
1052 viff_info.map_rows=3; in WriteVIFFImage()
1053 viff_info.map_columns=(unsigned int) image->colors; in WriteVIFFImage()
1061 viff_info.data_storage_type=VFF_TYP_BIT; in WriteVIFFImage()
1068 (void) WriteBlob(image,sizeof(viff_info.identifier),(unsigned char *) in WriteVIFFImage()
1069 &viff_info.identifier); in WriteVIFFImage()
1070 (void) WriteBlob(image,sizeof(viff_info.file_type),(unsigned char *) in WriteVIFFImage()
1071 &viff_info.file_type); in WriteVIFFImage()
1072 (void) WriteBlob(image,sizeof(viff_info.release),(unsigned char *) in WriteVIFFImage()
1073 &viff_info.release); in WriteVIFFImage()
1074 (void) WriteBlob(image,sizeof(viff_info.version),(unsigned char *) in WriteVIFFImage()
1075 &viff_info.version); in WriteVIFFImage()
1076 (void) WriteBlob(image,sizeof(viff_info.machine_dependency), in WriteVIFFImage()
1077 (unsigned char *) &viff_info.machine_dependency); in WriteVIFFImage()
1078 (void) WriteBlob(image,sizeof(viff_info.reserve),(unsigned char *) in WriteVIFFImage()
1079 viff_info.reserve); in WriteVIFFImage()
1080 (void) WriteBlob(image,512,(unsigned char *) viff_info.comment); in WriteVIFFImage()
1081 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.rows); in WriteVIFFImage()
1082 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.columns); in WriteVIFFImage()
1083 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.subrows); in WriteVIFFImage()
1084 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.x_offset); in WriteVIFFImage()
1085 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.y_offset); in WriteVIFFImage()
1086 viff_info.x_bits_per_pixel=(unsigned int) ((63 << 24) | (128 << 16)); in WriteVIFFImage()
1087 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.x_bits_per_pixel); in WriteVIFFImage()
1088 viff_info.y_bits_per_pixel=(unsigned int) ((63 << 24) | (128 << 16)); in WriteVIFFImage()
1089 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.y_bits_per_pixel); in WriteVIFFImage()
1090 (void) WriteBlobMSBLong(image,viff_info.location_type); in WriteVIFFImage()
1091 (void) WriteBlobMSBLong(image,viff_info.location_dimension); in WriteVIFFImage()
1092 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.number_of_images); in WriteVIFFImage()
1093 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.number_data_bands); in WriteVIFFImage()
1094 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.data_storage_type); in WriteVIFFImage()
1095 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.data_encode_scheme); in WriteVIFFImage()
1096 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_scheme); in WriteVIFFImage()
1097 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_storage_type); in WriteVIFFImage()
1098 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_rows); in WriteVIFFImage()
1099 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_columns); in WriteVIFFImage()
1100 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_subrows); in WriteVIFFImage()
1101 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_enable); in WriteVIFFImage()
1102 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.maps_per_cycle); in WriteVIFFImage()
1103 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.color_space_model); in WriteVIFFImage()