• Home
  • Raw
  • Download

Lines Matching refs:viff_info

255     viff_info;  in ReadVIFFImage()  local
277 count=ReadBlob(image,1,&viff_info.identifier); in ReadVIFFImage()
283 if ((count != 1) || ((unsigned char) viff_info.identifier != 0xab)) in ReadVIFFImage()
288 (void) ReadBlob(image,sizeof(viff_info.file_type),&viff_info.file_type); in ReadVIFFImage()
289 (void) ReadBlob(image,sizeof(viff_info.release),&viff_info.release); in ReadVIFFImage()
290 (void) ReadBlob(image,sizeof(viff_info.version),&viff_info.version); in ReadVIFFImage()
291 (void) ReadBlob(image,sizeof(viff_info.machine_dependency), in ReadVIFFImage()
292 &viff_info.machine_dependency); in ReadVIFFImage()
293 (void) ReadBlob(image,sizeof(viff_info.reserve),viff_info.reserve); in ReadVIFFImage()
294 count=ReadBlob(image,512,(unsigned char *) viff_info.comment); in ReadVIFFImage()
295 viff_info.comment[511]='\0'; in ReadVIFFImage()
296 if (strlen(viff_info.comment) > 4) in ReadVIFFImage()
297 (void) SetImageProperty(image,"comment",viff_info.comment,exception); in ReadVIFFImage()
298 if ((viff_info.machine_dependency == VFF_DEP_DECORDER) || in ReadVIFFImage()
299 (viff_info.machine_dependency == VFF_DEP_NSORDER)) in ReadVIFFImage()
303 viff_info.rows=ReadBlobLong(image); in ReadVIFFImage()
304 viff_info.columns=ReadBlobLong(image); in ReadVIFFImage()
305 viff_info.subrows=ReadBlobLong(image); in ReadVIFFImage()
306 viff_info.x_offset=ReadBlobSignedLong(image); in ReadVIFFImage()
307 viff_info.y_offset=ReadBlobSignedLong(image); in ReadVIFFImage()
308 viff_info.x_bits_per_pixel=(float) ReadBlobLong(image); in ReadVIFFImage()
309 viff_info.y_bits_per_pixel=(float) ReadBlobLong(image); in ReadVIFFImage()
310 viff_info.location_type=ReadBlobLong(image); in ReadVIFFImage()
311 viff_info.location_dimension=ReadBlobLong(image); in ReadVIFFImage()
312 viff_info.number_of_images=ReadBlobLong(image); in ReadVIFFImage()
313 viff_info.number_data_bands=ReadBlobLong(image); in ReadVIFFImage()
314 viff_info.data_storage_type=ReadBlobLong(image); in ReadVIFFImage()
315 viff_info.data_encode_scheme=ReadBlobLong(image); in ReadVIFFImage()
316 viff_info.map_scheme=ReadBlobLong(image); in ReadVIFFImage()
317 viff_info.map_storage_type=ReadBlobLong(image); in ReadVIFFImage()
318 viff_info.map_rows=ReadBlobLong(image); in ReadVIFFImage()
319 viff_info.map_columns=ReadBlobLong(image); in ReadVIFFImage()
320 viff_info.map_subrows=ReadBlobLong(image); in ReadVIFFImage()
321 viff_info.map_enable=ReadBlobLong(image); in ReadVIFFImage()
322 viff_info.maps_per_cycle=ReadBlobLong(image); in ReadVIFFImage()
323 viff_info.color_space_model=ReadBlobLong(image); in ReadVIFFImage()
328 image->columns=viff_info.rows; in ReadVIFFImage()
329 image->rows=viff_info.columns; in ReadVIFFImage()
330 image->depth=viff_info.x_bits_per_pixel <= 8 ? 8UL : in ReadVIFFImage()
335 number_pixels=(MagickSizeType) viff_info.columns*viff_info.rows; in ReadVIFFImage()
340 if ((viff_info.number_data_bands < 1) || (viff_info.number_data_bands > 4)) in ReadVIFFImage()
342 if ((viff_info.data_storage_type != VFF_TYP_BIT) && in ReadVIFFImage()
343 (viff_info.data_storage_type != VFF_TYP_1_BYTE) && in ReadVIFFImage()
344 (viff_info.data_storage_type != VFF_TYP_2_BYTE) && in ReadVIFFImage()
345 (viff_info.data_storage_type != VFF_TYP_4_BYTE) && in ReadVIFFImage()
346 (viff_info.data_storage_type != VFF_TYP_FLOAT) && in ReadVIFFImage()
347 (viff_info.data_storage_type != VFF_TYP_DOUBLE)) in ReadVIFFImage()
349 if (viff_info.data_encode_scheme != VFF_DES_RAW) in ReadVIFFImage()
351 if ((viff_info.map_storage_type != VFF_MAPTYP_NONE) && in ReadVIFFImage()
352 (viff_info.map_storage_type != VFF_MAPTYP_1_BYTE) && in ReadVIFFImage()
353 (viff_info.map_storage_type != VFF_MAPTYP_2_BYTE) && in ReadVIFFImage()
354 (viff_info.map_storage_type != VFF_MAPTYP_4_BYTE) && in ReadVIFFImage()
355 (viff_info.map_storage_type != VFF_MAPTYP_FLOAT) && in ReadVIFFImage()
356 (viff_info.map_storage_type != VFF_MAPTYP_DOUBLE)) in ReadVIFFImage()
358 if ((viff_info.color_space_model != VFF_CM_NONE) && in ReadVIFFImage()
359 (viff_info.color_space_model != VFF_CM_ntscRGB) && in ReadVIFFImage()
360 (viff_info.color_space_model != VFF_CM_genericRGB)) in ReadVIFFImage()
362 if (viff_info.location_type != VFF_LOC_IMPLICIT) in ReadVIFFImage()
364 if (viff_info.number_of_images != 1) in ReadVIFFImage()
366 if (viff_info.map_rows == 0) in ReadVIFFImage()
367 viff_info.map_scheme=VFF_MS_NONE; in ReadVIFFImage()
368 switch ((int) viff_info.map_scheme) in ReadVIFFImage()
372 if (viff_info.number_data_bands < 3) in ReadVIFFImage()
377 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
380 if (viff_info.data_storage_type == VFF_MAPTYP_1_BYTE) in ReadVIFFImage()
399 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
408 image->colors=viff_info.map_columns; in ReadVIFFImage()
411 if (viff_info.map_rows > in ReadVIFFImage()
412 (viff_info.map_rows*bytes_per_pixel*sizeof(*viff_colormap))) in ReadVIFFImage()
415 viff_info.map_rows*bytes_per_pixel*sizeof(*viff_colormap)); in ReadVIFFImage()
421 count=ReadBlob(image,bytes_per_pixel*image->colors*viff_info.map_rows, in ReadVIFFImage()
425 ((viff_info.machine_dependency != VFF_DEP_DECORDER) && in ReadVIFFImage()
426 (viff_info.machine_dependency != VFF_DEP_NSORDER))) in ReadVIFFImage()
427 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
432 viff_info.map_rows)); in ReadVIFFImage()
439 viff_info.map_rows)); in ReadVIFFImage()
444 for (i=0; i < (ssize_t) (viff_info.map_rows*image->colors); i++) in ReadVIFFImage()
446 switch ((int) viff_info.map_storage_type) in ReadVIFFImage()
479 image->alpha_trait=viff_info.number_data_bands == 4 ? BlendPixelTrait : in ReadVIFFImage()
481 image->storage_class=(viff_info.number_data_bands < 3 ? PseudoClass : in ReadVIFFImage()
483 image->columns=viff_info.rows; in ReadVIFFImage()
484 image->rows=viff_info.columns; in ReadVIFFImage()
494 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
502 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
510 if (HeapOverflowSanityCheck(number_pixels,viff_info.number_data_bands) != MagickFalse) in ReadVIFFImage()
512 max_packets=(size_t) (number_pixels*viff_info.number_data_bands); in ReadVIFFImage()
521 ((viff_info.machine_dependency != VFF_DEP_DECORDER) && in ReadVIFFImage()
522 (viff_info.machine_dependency != VFF_DEP_NSORDER))) in ReadVIFFImage()
523 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
540 if ((viff_info.data_storage_type != VFF_TYP_1_BYTE) && in ReadVIFFImage()
541 (viff_info.map_scheme == VFF_MS_NONE)) in ReadVIFFImage()
549 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
561 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
592 switch ((int) viff_info.data_storage_type) in ReadVIFFImage()
600 if (viff_info.map_scheme == VFF_MS_NONE) in ReadVIFFImage()
616 if (viff_info.data_storage_type == VFF_TYP_BIT) in ReadVIFFImage()
749 count=ReadBlob(image,1,&viff_info.identifier); in ReadVIFFImage()
750 if ((count != 0) && (viff_info.identifier == 0xab)) in ReadVIFFImage()
767 } while ((count != 0) && (viff_info.identifier == 0xab)); in ReadVIFFImage()
953 viff_info; in WriteVIFFImage() local
969 (void) ResetMagickMemory(&viff_info,0,sizeof(ViffInfo)); in WriteVIFFImage()
978 viff_info.identifier=(char) 0xab; in WriteVIFFImage()
980 viff_info.file_type=1; in WriteVIFFImage()
981 viff_info.release=1; in WriteVIFFImage()
982 viff_info.version=3; in WriteVIFFImage()
983 viff_info.machine_dependency=VFF_DEP_IEEEORDER; /* IEEE byte ordering */ in WriteVIFFImage()
984 *viff_info.comment='\0'; in WriteVIFFImage()
987 (void) CopyMagickString(viff_info.comment,value,MagickMin(strlen(value), in WriteVIFFImage()
989 viff_info.rows=image->columns; in WriteVIFFImage()
990 viff_info.columns=image->rows; in WriteVIFFImage()
991 viff_info.subrows=0; in WriteVIFFImage()
992 viff_info.x_offset=(~0); in WriteVIFFImage()
993 viff_info.y_offset=(~0); in WriteVIFFImage()
994 viff_info.x_bits_per_pixel=0; in WriteVIFFImage()
995 viff_info.y_bits_per_pixel=0; in WriteVIFFImage()
996 viff_info.location_type=VFF_LOC_IMPLICIT; in WriteVIFFImage()
997 viff_info.location_dimension=0; in WriteVIFFImage()
998 viff_info.number_of_images=1; in WriteVIFFImage()
999 viff_info.data_encode_scheme=VFF_DES_RAW; in WriteVIFFImage()
1000 viff_info.map_scheme=VFF_MS_NONE; in WriteVIFFImage()
1001 viff_info.map_storage_type=VFF_MAPTYP_NONE; in WriteVIFFImage()
1002 viff_info.map_rows=0; in WriteVIFFImage()
1003 viff_info.map_columns=0; in WriteVIFFImage()
1004 viff_info.map_subrows=0; in WriteVIFFImage()
1005 viff_info.map_enable=1; /* no colormap */ in WriteVIFFImage()
1006 viff_info.maps_per_cycle=0; in WriteVIFFImage()
1013 viff_info.number_data_bands=image->alpha_trait ? 4U : 3U; in WriteVIFFImage()
1014 viff_info.color_space_model=VFF_CM_genericRGB; in WriteVIFFImage()
1015 viff_info.data_storage_type=VFF_TYP_1_BYTE; in WriteVIFFImage()
1016 packets=viff_info.number_data_bands*number_pixels; in WriteVIFFImage()
1020 viff_info.number_data_bands=1; in WriteVIFFImage()
1021 viff_info.color_space_model=VFF_CM_NONE; in WriteVIFFImage()
1022 viff_info.data_storage_type=VFF_TYP_1_BYTE; in WriteVIFFImage()
1029 viff_info.map_scheme=VFF_MS_ONEPERBAND; in WriteVIFFImage()
1030 viff_info.map_storage_type=VFF_MAPTYP_1_BYTE; in WriteVIFFImage()
1031 viff_info.map_rows=3; in WriteVIFFImage()
1032 viff_info.map_columns=(unsigned int) image->colors; in WriteVIFFImage()
1040 viff_info.data_storage_type=VFF_TYP_BIT; in WriteVIFFImage()
1047 (void) WriteBlob(image,sizeof(viff_info.identifier),(unsigned char *) in WriteVIFFImage()
1048 &viff_info.identifier); in WriteVIFFImage()
1049 (void) WriteBlob(image,sizeof(viff_info.file_type),(unsigned char *) in WriteVIFFImage()
1050 &viff_info.file_type); in WriteVIFFImage()
1051 (void) WriteBlob(image,sizeof(viff_info.release),(unsigned char *) in WriteVIFFImage()
1052 &viff_info.release); in WriteVIFFImage()
1053 (void) WriteBlob(image,sizeof(viff_info.version),(unsigned char *) in WriteVIFFImage()
1054 &viff_info.version); in WriteVIFFImage()
1055 (void) WriteBlob(image,sizeof(viff_info.machine_dependency), in WriteVIFFImage()
1056 (unsigned char *) &viff_info.machine_dependency); in WriteVIFFImage()
1057 (void) WriteBlob(image,sizeof(viff_info.reserve),(unsigned char *) in WriteVIFFImage()
1058 viff_info.reserve); in WriteVIFFImage()
1059 (void) WriteBlob(image,512,(unsigned char *) viff_info.comment); in WriteVIFFImage()
1060 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.rows); in WriteVIFFImage()
1061 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.columns); in WriteVIFFImage()
1062 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.subrows); in WriteVIFFImage()
1063 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.x_offset); in WriteVIFFImage()
1064 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.y_offset); in WriteVIFFImage()
1065 viff_info.x_bits_per_pixel=(unsigned int) ((63 << 24) | (128 << 16)); in WriteVIFFImage()
1066 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.x_bits_per_pixel); in WriteVIFFImage()
1067 viff_info.y_bits_per_pixel=(unsigned int) ((63 << 24) | (128 << 16)); in WriteVIFFImage()
1068 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.y_bits_per_pixel); in WriteVIFFImage()
1069 (void) WriteBlobMSBLong(image,viff_info.location_type); in WriteVIFFImage()
1070 (void) WriteBlobMSBLong(image,viff_info.location_dimension); in WriteVIFFImage()
1071 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.number_of_images); in WriteVIFFImage()
1072 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.number_data_bands); in WriteVIFFImage()
1073 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.data_storage_type); in WriteVIFFImage()
1074 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.data_encode_scheme); in WriteVIFFImage()
1075 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_scheme); in WriteVIFFImage()
1076 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_storage_type); in WriteVIFFImage()
1077 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_rows); in WriteVIFFImage()
1078 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_columns); in WriteVIFFImage()
1079 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_subrows); in WriteVIFFImage()
1080 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.map_enable); in WriteVIFFImage()
1081 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.maps_per_cycle); in WriteVIFFImage()
1082 (void) WriteBlobMSBLong(image,(unsigned int) viff_info.color_space_model); in WriteVIFFImage()