switch(ce)
{
case RGBA16:
- // Documentation specifies padding with zeros for converting from 5 to 8 bits.
+ /* Documentation specifies padding with zeros for converting from 5 to 8 bits. */
return ScaleCharToQuantum((word>>channel*5 & ~(~0x0<<5))<<3);
case RGB24:
case RGBA32:
#ifndef MIN
#define MIN(a,b) ((a)<(b)? a:b)
#endif
- // 0x80 -> 1.0 alpha. Multiply by 2 and clamp to 0xFF
+ /* 0x80 -> 1.0 alpha. Multiply by 2 and clamp to 0xFF */
return ScaleCharToQuantum(MIN((word>>3*8&0xFF)<<1,0xFF));
default:
return 0xFF;
static inline void deshufflePalette(Image *image,PixelInfo* oldColormap){
const uint8_t
- pages=image->colors/32,//Pages per CLUT
- blocks=4,//Blocks per page
- colors=8;//Colors per block
+ pages=image->colors/32, /* Pages per CLUT */
+ blocks=4, /* Blocks per page */
+ colors=8; /* Colors per block */
size_t
i=0;
* Verify TIM2 magic number.
*/
tim2_file_header.magic_num=ReadBlobMSBLong(image);
- if (tim2_file_header.magic_num != 0x54494D32) /*"TIM2"*/
+ if (tim2_file_header.magic_num != 0x54494D32) /* "TIM2" */
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
/*
has_clut=tim2_image_header.clut_type!=0;
if(has_clut){
- // CLUT bits per color
- switch((int) tim2_image_header.clut_type&0x0F)//Low 4 bits
+ /* CLUT bits per color */
+ switch((int) tim2_image_header.clut_type&0x0F) /* Low 4 bits */
{
case 1: clut_depth=16;break;
case 2: clut_depth=24;break;
}
}
- // Bits per pixel.
+ /* Bits per pixel. */
switch ((int) tim2_image_header.bpp_type)
{
case 1: bits_per_pixel=16;break;
case 2: bits_per_pixel=24;break;
case 3: bits_per_pixel=32;break;
- case 4: bits_per_pixel=4;break;// Implies CLUT
- case 5: bits_per_pixel=8;break;// Implies CLUT
+ case 4: bits_per_pixel=4;break; /* Implies CLUT */
+ case 5: bits_per_pixel=8;break; /* Implies CLUT */
default:
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
break;
}
}
}
- else //has_clut==false
+ else /* has_clut==false */
{
#define SetPixelAllChannels(image,word,q,enc) \
}
tim2_clut_data=(unsigned char *) RelinquishMagickMemory(tim2_clut_data);
- //CSM: CLUT Storage Mode
- switch ((int) tim2_image_header.clut_type>>4)//High 4 bits
+ /* CSM: CLUT Storage Mode */
+ switch ((int) tim2_image_header.clut_type>>4) /* High 4 bits */
{
case 0: csm=CSM1;break;
case 1: csm=CSM2;break;