ssize_t
count,
+ page_count,
y;
struct tm
(double) object+1);
(void) WriteBlobString(image,buffer);
count=(ssize_t) (pages_id+ObjectsPerImage+1);
+ page_count=1;
if (image_info->adjoin != MagickFalse)
{
Image
kid_image=image;
for ( ; GetNextImageInList(kid_image) != (Image *) NULL; count+=ObjectsPerImage)
{
+ page_count++;
+ profile=GetImageProfile(kid_image,"icc");
+ if (profile != (StringInfo *) NULL)
+ count+=2;
(void) FormatLocaleString(buffer,MagickPathExtent,"%.20g 0 R ",(double)
count);
(void) WriteBlobString(image,buffer);
}
(void) WriteBlobString(image,"]\n");
(void) FormatLocaleString(buffer,MagickPathExtent,"/Count %.20g\n",(double)
- ((count-pages_id)/ObjectsPerImage));
+ page_count);
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"endobj\n");
scene=0;
do
{
+ MagickBooleanType
+ has_icc_profile;
+
+ profile=GetImageProfile(image,"icc");
+ has_icc_profile=(profile != (StringInfo *) NULL) ? MagickTrue : MagickFalse;
compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
(double) object+1);
(void) WriteBlobString(image,buffer);
(void) FormatLocaleString(buffer,MagickPathExtent,"/Thumb %.20g 0 R\n",
- (double) object+8);
- profile=GetImageProfile(image,"icc");
- if (profile != (StringInfo *) NULL)
- (void) FormatLocaleString(buffer,MagickPathExtent,"/Thumb %.20g 0 R\n",
- (double) object+10);
+ (double) object+(has_icc_profile != MagickFalse ? 10 : 8));
(void) WriteBlobString(image,buffer);
(void) WriteBlobString(image,">>\n");
(void) WriteBlobString(image,"endobj\n");
if (image->alpha_trait != UndefinedPixelTrait)
{
(void) FormatLocaleString(buffer,MagickPathExtent,"/SMask %.20g 0 R\n",
- (double) object+7);
- profile=GetImageProfile(image,"icc");
- if (profile != (StringInfo *) NULL)
- (void) FormatLocaleString(buffer,MagickPathExtent,
- "/SMask %.20g 0 R\n",(double) object+9);
+ (double) object+(has_icc_profile != MagickFalse ? 9 : 7));
(void) WriteBlobString(image,buffer);
}
(void) FormatLocaleString(buffer,MagickPathExtent,"/Length %.20g 0 R\n",
tile_image->rows);
(void) WriteBlobString(image,buffer);
(void) FormatLocaleString(buffer,MagickPathExtent,"/ColorSpace %.20g 0 R\n",
- (double) object-1);
- profile=GetImageProfile(image,"icc");
- if (profile != (StringInfo *) NULL)
- (void) FormatLocaleString(buffer,MagickPathExtent,
- "/ColorSpace %.20g 0 R\n",(double) object-3);
+ (double) object-(has_icc_profile != MagickFalse ? 3 : 1));
(void) WriteBlobString(image,buffer);
(void) FormatLocaleString(buffer,MagickPathExtent,"/BitsPerComponent %d\n",
(compression == FaxCompression) || (compression == Group4Compression) ?