% Read/Write HP PCL Printer Format %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2015 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
if (read_info->scenes != (char *) NULL)
*read_info->scenes='\0';
}
- option=GetImageArtifact(image,"authenticate");
+ option=GetImageOption(image_info,"authenticate");
if (option != (const char *) NULL)
(void) FormatLocaleString(options+strlen(options),MaxTextExtent,
" -sPCLPassword=%s",option);
read_info->antialias != MagickFalse ? 4 : 1,
read_info->antialias != MagickFalse ? 4 : 1,density,options,
read_info->filename,input_filename);
- status=SystemCommand(MagickFalse,read_info->verbose,command,exception) != 0 ?
- MagickTrue : MagickFalse;
+ status=ExternalDelegateCommand(MagickFalse,read_info->verbose,command,
+ (char *) NULL,exception) != 0 ? MagickTrue : MagickFalse;
image=ReadImage(read_info,exception);
(void) RelinquishUniqueFileResource(read_info->filename);
(void) RelinquishUniqueFileResource(input_filename);
entry->decoder=(DecodeImageHandler *) ReadPCLImage;
entry->encoder=(EncodeImageHandler *) WritePCLImage;
entry->magick=(IsImageFormatHandler *) IsPCL;
- entry->blob_support=MagickFalse;
- entry->seekable_stream=MagickTrue;
- entry->thread_support=EncoderThreadSupport;
+ entry->flags^=CoderBlobSupportFlag;
+ entry->flags^=CoderDecoderThreadSupportFlag;
+ entry->flags|=CoderSeekableStreamFlag;
entry->description=ConstantString("Printer Control Language");
entry->module=ConstantString("PCL");
(void) RegisterMagickInfo(entry);
char
buffer[MaxTextExtent];
+ CompressionType
+ compression;
+
const char
*option;
one=1;
do
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Initialize the printer.
*/
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
(void) WriteBlobString(image,"\033E"); /* printer reset */
(void) WriteBlobString(image,"\033*r3F"); /* set presentation mode */
(void) FormatLocaleString(buffer,MaxTextExtent,"\033*r%.20gs%.20gT",
(void) WriteBlobString(image,buffer);
}
}
- option=GetImageArtifact(image,"pcl:fit-to-page");
+ option=GetImageOption(image_info,"pcl:fit-to-page");
if (IfMagickTrue(IsStringTrue(option)))
(void) WriteBlobString(image,"\033*r3A");
else
(void) ResetMagickMemory(pixels,0,(length+1)*sizeof(*pixels));
compress_pixels=(unsigned char *) NULL;
previous_pixels=(unsigned char *) NULL;
- switch (image->compression)
+
+ compression=UndefinedCompression;
+ if (image_info->compression != UndefinedCompression)
+ compression=image_info->compression;
+ switch (compression)
{
case NoCompression:
{
for (x=0; x < (ssize_t) image->columns; x++)
{
byte<<=1;
- if (GetPixelIntensity(image,p) < ((double) QuantumRange/2.0))
+ if (GetPixelLuma(image,p) < (QuantumRange/2.0))
byte|=0x01;
bit++;
if (bit == 8)
break;
}
}
- switch (image->compression)
+ switch (compression)
{
case NoCompression:
{
}
}
(void) WriteBlobString(image,"\033*rB"); /* end graphics */
- switch (image->compression)
+ switch (compression)
{
case NoCompression:
break;