~ubuntu-branches/ubuntu/quantal/imagemagick/quantal

« back to all changes in this revision

Viewing changes to coders/sgi.c

  • Committer: Bazaar Package Importer
  • Author(s): Muharem Hrnjadovic
  • Date: 2009-06-04 13:01:13 UTC
  • mfrom: (1.1.5 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090604130113-my9114jxmafpwew3
Tags: 7:6.5.1.0-1.1ubuntu1
* Merge from debian unstable, remaining changes:
  - (Build-)depend on libltdl7-dev instead of libltdl3-dev (the armel buildds
    currently have both available).
  - Don't build-dep on librsvg, it brings in excessive dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
%                                 July 1992                                   %
18
18
%                                                                             %
19
19
%                                                                             %
20
 
%  Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization      %
 
20
%  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization      %
21
21
%  dedicated to making software imaging solutions freely available.           %
22
22
%                                                                             %
23
23
%  You may not use this file except in compliance with the License.  You may  %
42
42
#include "magick/studio.h"
43
43
#include "magick/blob.h"
44
44
#include "magick/blob-private.h"
 
45
#include "magick/cache.h"
45
46
#include "magick/color.h"
46
47
#include "magick/color-private.h"
47
48
#include "magick/colorspace.h"
371
372
    if ((image_info->ping != MagickFalse)  && (image_info->number_scenes != 0))
372
373
      if (image->scene >= (image_info->scene+image_info->number_scenes-1))
373
374
        break;
374
 
    if (SetImageExtent(image,0,0) == MagickFalse)
375
 
      {
376
 
        InheritException(exception,&image->exception);
377
 
        return(DestroyImageList(image));
378
 
      }
379
375
    /*
380
376
      Allocate SGI pixels.
381
377
    */
554
550
            for (y=0; y < (long) image->rows; y++)
555
551
            {
556
552
              p=iris_pixels+(image->rows-y-1)*8*image->columns;
557
 
              q=SetImagePixels(image,0,y,image->columns,1);
 
553
              q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
558
554
              if (q == (PixelPacket *) NULL)
559
555
                break;
560
556
              for (x=0; x < (long) image->columns; x++)
572
568
                p+=8;
573
569
                q++;
574
570
              }
575
 
              if (SyncImagePixels(image) == MagickFalse)
 
571
              if (SyncAuthenticPixels(image,exception) == MagickFalse)
576
572
                break;
577
573
              if (image->previous == (Image *) NULL)
578
574
                {
586
582
          for (y=0; y < (long) image->rows; y++)
587
583
          {
588
584
            p=iris_pixels+(image->rows-y-1)*4*image->columns;
589
 
            q=SetImagePixels(image,0,y,image->columns,1);
 
585
            q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
590
586
            if (q == (PixelPacket *) NULL)
591
587
              break;
592
588
            for (x=0; x < (long) image->columns; x++)
600
596
              p+=4;
601
597
              q++;
602
598
            }
603
 
            if (SyncImagePixels(image) == MagickFalse)
 
599
            if (SyncAuthenticPixels(image,exception) == MagickFalse)
604
600
              break;
605
601
            if (image->previous == (Image *) NULL)
606
602
              {
625
621
            for (y=0; y < (long) image->rows; y++)
626
622
            {
627
623
              p=iris_pixels+(image->rows-y-1)*8*image->columns;
628
 
              q=SetImagePixels(image,0,y,image->columns,1);
 
624
              q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
629
625
              if (q == (PixelPacket *) NULL)
630
626
                break;
631
 
              indexes=GetIndexes(image);
 
627
              indexes=GetAuthenticIndexQueue(image);
632
628
              for (x=0; x < (long) image->columns; x++)
633
629
              {
634
630
                quantum=(*p << 8);
637
633
                p+=8;
638
634
                q++;
639
635
              }
640
 
              if (SyncImagePixels(image) == MagickFalse)
 
636
              if (SyncAuthenticPixels(image,exception) == MagickFalse)
641
637
                break;
642
638
              if (image->previous == (Image *) NULL)
643
639
                {
651
647
          for (y=0; y < (long) image->rows; y++)
652
648
          {
653
649
            p=iris_pixels+(image->rows-y-1)*4*image->columns;
654
 
            q=SetImagePixels(image,0,y,image->columns,1);
 
650
            q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
655
651
            if (q == (PixelPacket *) NULL)
656
652
              break;
657
 
            indexes=GetIndexes(image);
 
653
            indexes=GetAuthenticIndexQueue(image);
658
654
            for (x=0; x < (long) image->columns; x++)
659
655
            {
660
656
              indexes[x]=(IndexPacket) (*p);
661
657
              p+=4;
662
658
              q++;
663
659
            }
664
 
            if (SyncImagePixels(image) == MagickFalse)
 
660
            if (SyncAuthenticPixels(image,exception) == MagickFalse)
665
661
              break;
666
662
            if (image->previous == (Image *) NULL)
667
663
              {
911
907
      (void) SetImageColorspace(image,RGBColorspace);
912
908
    (void) ResetMagickMemory(&iris_info,0,sizeof(iris_info));
913
909
    iris_info.magic=0x01DA;
914
 
    compression=image_info->compression;
 
910
    compression=image->compression;
 
911
    if (image_info->compression != UndefinedCompression)
 
912
      compression=image_info->compression;
915
913
    if (image->depth > 8)
916
914
      compression=NoCompression;
917
915
    if (compression == NoCompression)
975
973
    */
976
974
    for (y=0; y < (long) image->rows; y++)
977
975
    {
978
 
      p=AcquireImagePixels(image,0,y,image->columns,1,&image->exception);
 
976
      p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
979
977
      if (p == (const PixelPacket *) NULL)
980
978
        break;
981
979
      if (image->depth <= 8)