(void) FormatMagickString(read_info->filename,MaxTextExtent,"tiff:%.1024s",
filename);
huffman_image=ReadImage(read_info,exception);
+ if (huffman_image != (Image *) NULL)
+ {
+ (void) CopyMagickString(huffman_image->filename,image_info->filename,
+ MaxTextExtent);
+ (void) CopyMagickString(huffman_image->magick_filename,
+ image_info->filename,MaxTextExtent);
+ (void) CopyMagickString(huffman_image->magick,"CALS",MaxTextExtent);
+ }
read_info=DestroyImageInfo(read_info);
(void) RelinquishUniqueFileResource(filename);
return(huffman_image);
MagickInfo
*entry;
+ static const char
+ *CALSDescription=
+ {
+ "Continuous Acquisition and Life-cycle Support Type 1 Image"
+ },
+ *CALSNote=
+ {
+ "Specified in MIL-R-28002 and MIL-PRF-28002"
+ };
+
+ entry=SetMagickInfo("CAL");
+ entry->decoder=(DecodeImageHandler *) ReadCALSImage;
+#if defined(MAGICKCORE_TIFF_DELEGATE)
+ entry->encoder=(EncodeImageHandler *) WriteCALSImage;
+#endif
+ entry->adjoin=MagickFalse;
+ entry->magick=(IsImageFormatHandler *) IsCALS;
+ entry->description=ConstantString(CALSDescription);
+ entry->note=ConstantString(CALSNote);
+ entry->module=ConstantString("CALS");
+ (void) RegisterMagickInfo(entry);
entry=SetMagickInfo("CALS");
entry->decoder=(DecodeImageHandler *) ReadCALSImage;
+#if defined(MAGICKCORE_TIFF_DELEGATE)
entry->encoder=(EncodeImageHandler *) WriteCALSImage;
+#endif
entry->adjoin=MagickFalse;
entry->magick=(IsImageFormatHandler *) IsCALS;
- entry->description=ConstantString("Automated Interchange of Technical "
- "Information, MIL-STD-1840A");
+ entry->description=ConstantString(CALSDescription);
+ entry->note=ConstantString(CALSNote);
entry->module=ConstantString("CALS");
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
*/
ModuleExport void UnregisterCALSImage(void)
{
+ (void) UnregisterMagickInfo("CAL");
(void) UnregisterMagickInfo("CALS");
}
\f
write_info=CloneImageInfo(image_info);
SetImageInfoFile(write_info,file);
write_info->compression=Group4Compression;
+ write_info->type=BilevelType;
(void) SetImageOption(write_info,"quantum:polarity","min-is-white");
status=WriteImage(write_info,huffman_image);
(void) fflush(file);