Changeset 11588
- Timestamp:
- 07/07/08 16:29:04 (8 weeks ago)
- Location:
- ImageMagick/trunk
- Files:
-
- 2 modified
-
coders/dcm.c (modified) (6 diffs)
-
magick/nt-base.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/dcm.c
r11421 r11588 2739 2739 bytes_per_pixel, 2740 2740 datum, 2741 depth,2742 2741 height, 2743 2742 high_bit, … … 2805 2804 height=0; 2806 2805 max_value=255UL; 2807 depth=8UL;2806 image->=8UL; 2808 2807 mask=0xffff; 2809 2808 number_scenes=1; … … 3061 3060 if (datum > 8) 3062 3061 bytes_per_pixel=2; 3063 depth=bits_allocated;3064 if ( depth > 32)3062 image->depth=bits_allocated; 3063 if (image->depth > 32) 3065 3064 ThrowReaderException(CorruptImageError,"ImproperImageHeader"); 3066 3065 max_value=(1UL << bits_allocated)-1; … … 3076 3075 if (significant_bits > 8) 3077 3076 bytes_per_pixel=2; 3078 depth=significant_bits;3079 if ( depth > 32)3077 image->depth=significant_bits; 3078 if (image->depth > 32) 3080 3079 ThrowReaderException(CorruptImageError,"ImproperImageHeader"); 3081 3080 max_value=(1UL << significant_bits)-1; … … 3341 3340 } 3342 3341 scale=(Quantum *) NULL; 3343 if ( depth != (1UL*MAGICKCORE_QUANTUM_DEPTH))3342 if (image->depth != (1UL*MAGICKCORE_QUANTUM_DEPTH)) 3344 3343 { 3345 3344 QuantumAny … … 3352 3351 Compute pixel scaling table. 3353 3352 */ 3354 length=(size_t) (GetQuantumRange( depth)+1);3353 length=(size_t) (GetQuantumRange(image->depth)+1); 3355 3354 scale=(Quantum *) AcquireQuantumMemory(length,sizeof(*scale)); 3356 3355 if (scale == (Quantum *) NULL) 3357 3356 ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); 3358 quantum_scale=GetQuantumScale(depth); 3359 for (i=0; i < (long) (GetQuantumRange(depth)+1); i++) 3360 scale[i]=ScaleAnyToQuantum((unsigned long) i,depth,quantum_scale); 3357 quantum_scale=GetQuantumScale(image->depth); 3358 for (i=0; i < (long) (GetQuantumRange(image->depth)+1); i++) 3359 scale[i]=ScaleAnyToQuantum((unsigned long) i,image->depth, 3360 quantum_scale); 3361 3361 } 3362 3362 msb_first=strcmp(transfer_syntax,"1.2.840.10008.1.2.2") == 0 ? MagickTrue : -
ImageMagick/trunk/magick/nt-base.h
r10855 r11588 82 82 #if !defined(fileno) 83 83 # define fileno _fileno 84 #endif 85 #if !defined(fsync) 86 # define fsync _commit 84 87 #endif 85 88 #if !defined(ftruncate)
