}
case 16:
{
- bytes_per_row=2*(((size_t) samples_per_pixel*columns*bits_per_pixel+8)/
- 16);
+ if (pad == MagickFalse)
+ {
+ bytes_per_row=2*(((size_t) samples_per_pixel*columns*bits_per_pixel+
+ 15)/16);
+ break;
+ }
+ bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+31)/
+ 32);
break;
}
case 32:
shift=4*TimeFields;
for (i=0; i <= TimeFields; i++)
{
- (void) FormatLocaleString(code,MaxTextExtent-strlen(code),"%x",
+ (void) FormatLocaleString(code,MagickPathExtent-strlen(code),"%x",
(unsigned int) ((timestamp >> shift) & 0x0fU));
code++;
if (((i % 2) != 0) && (i < TimeFields))
{
char
magick[4],
- value[MaxTextExtent];
+ value[MagickPathExtent];
DPXInfo
dpx;
for (i=0; i < 8; i++)
{
char
- property[MaxTextExtent];
+ property[MagickPathExtent];
dpx.image.image_element[i].data_sign=ReadBlobLong(image);
offset+=4;
offset++;
dpx.image.image_element[i].transfer_characteristic=(unsigned char)
ReadBlobByte(image);
- (void) FormatLocaleString(property,MaxTextExtent,
+ (void) FormatLocaleString(property,MagickPathExtent,
"dpx:image.element[%lu].transfer-characteristic",(long) i);
(void) FormatImageProperty(image,property,"%s",
GetImageTransferCharacteristic((DPXTransferCharacteristic)
StringInfo
*profile;
- profile=BlobToStringInfo((const void *) NULL,
+ profile=BlobToStringInfo((const unsigned char *) NULL,
dpx.file.user_size-sizeof(dpx.user.id));
if (profile == (StringInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
MagickTrue : MagickFalse);
for (y=0; y < (ssize_t) image->rows; y++)
{
+ const unsigned char
+ *pixels;
+
MagickBooleanType
sync;
count,
offset;
- unsigned char
- *pixels;
-
if (status == MagickFalse)
continue;
- pixels=GetQuantumPixels(quantum_info);
- {
- count=ReadBlob(image,extent,pixels);
- if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
- (image->previous == (Image *) NULL))
- {
- MagickBooleanType
- proceed;
-
- proceed=SetImageProgress(image,LoadImageTag,(MagickOffsetType) row,
- image->rows);
- if (proceed == MagickFalse)
- status=MagickFalse;
- }
- offset=row++;
- }
+ pixels=(const unsigned char *) ReadBlobStream(image,extent,
+ GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) extent)
status=MagickFalse;
+ if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
+ (image->previous == (Image *) NULL))
+ {
+ MagickBooleanType
+ proceed;
+
+ proceed=SetImageProgress(image,LoadImageTag,(MagickOffsetType) row,
+ image->rows);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ offset=row++;
q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (Quantum *) NULL)
{
"See SMPTE 268M-2003 specification at http://www.smtpe.org\n"
};
- entry=SetMagickInfo("DPX");
+ entry=AcquireMagickInfo("DPX","DPX","SMPTE 268M-2003 (DPX 2.0)");
entry->decoder=(DecodeImageHandler *) ReadDPXImage;
entry->encoder=(EncodeImageHandler *) WriteDPXImage;
entry->magick=(IsImageFormatHandler *) IsDPX;
- entry->adjoin=MagickFalse;
- entry->seekable_stream=MagickTrue;
- entry->description=ConstantString("SMPTE 268M-2003 (DPX 2.0)");
+ entry->flags^=CoderAdjoinFlag;
+ entry->flags|=CoderSeekableStreamFlag;
entry->note=ConstantString(DPXNote);
- entry->module=ConstantString("DPX");
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
dpx.image.image_element[i].descriptor=RGBAComponentType;
if ((image_info->type != TrueColorType) &&
(image->alpha_trait == UndefinedPixelTrait) &&
- (IsImageGray(image,exception) != MagickFalse))
+ (SetImageGray(image,exception) != MagickFalse))
dpx.image.image_element[i].descriptor=LumaComponentType;
break;
}
if ((horizontal_factor == 2) || (vertical_factor == 2))
quantum_type=CbYCrYQuantum;
}
- extent=GetBytesPerRow(image->columns,image->alpha_trait != UndefinedPixelTrait ?
- 4UL : 3UL,image->depth,MagickTrue);
+ extent=GetBytesPerRow(image->columns,
+ image->alpha_trait != UndefinedPixelTrait ? 4UL : 3UL,image->depth,
+ dpx.image.image_element[0].packing == 0 ? MagickFalse : MagickTrue);
if ((image_info->type != TrueColorType) &&
(image->alpha_trait == UndefinedPixelTrait) &&
- (IsImageGray(image,exception) != MagickFalse))
+ (SetImageGray(image,exception) != MagickFalse))
{
quantum_type=GrayQuantum;
- extent=GetBytesPerRow(image->columns,1UL,image->depth,MagickTrue);
+ extent=GetBytesPerRow(image->columns,1UL,image->depth,
+ dpx.image.image_element[0].packing == 0 ? MagickFalse : MagickTrue);
}
- pixels=GetQuantumPixels(quantum_info);
+ pixels=(unsigned char *) GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);