~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to coders/vicar.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-06-15 11:05:28 UTC
  • mfrom: (6.2.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110615110528-08jgo07a4846xh8d
Tags: 8:6.6.0.4-3ubuntu1
* Resynchronise with Debian (LP: #797595).  Remaining changes:
  - Make ufraw-batch (universe) a suggestion instead of a recommendation.
  - Make debian/rules install target depend on check; they cannot reliably
    be run in parallel.
  - Don't set MAKEFLAGS in debian/rules; just pass it to the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "magick/blob.h"
44
44
#include "magick/blob-private.h"
45
45
#include "magick/cache.h"
46
 
#include "magick/colormap.h"
47
46
#include "magick/colorspace.h"
48
47
#include "magick/constitute.h"
49
48
#include "magick/exception.h"
153
152
  int
154
153
    c;
155
154
 
156
 
  ssize_t
 
155
  long
157
156
    y;
158
157
 
159
158
  MagickBooleanType
297
296
    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
298
297
  pixels=GetQuantumPixels(quantum_info);
299
298
  length=GetQuantumExtent(image,quantum_info,IndexQuantum);
300
 
  for (y=0; y < (ssize_t) image->rows; y++)
 
299
  for (y=0; y < (long) image->rows; y++)
301
300
  {
302
301
    q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
303
302
    if (q == (PixelPacket *) NULL)
307
306
      quantum_type,pixels,exception);
308
307
    if (SyncAuthenticPixels(image,exception) == MagickFalse)
309
308
      break;
310
 
    status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
311
 
                image->rows);
 
309
    status=SetImageProgress(image,LoadImageTag,y,image->rows);
312
310
    if (status == MagickFalse)
313
311
      break;
314
312
  }
341
339
%
342
340
%  The format of the RegisterVICARImage method is:
343
341
%
344
 
%      size_t RegisterVICARImage(void)
 
342
%      unsigned long RegisterVICARImage(void)
345
343
%
346
344
*/
347
 
ModuleExport size_t RegisterVICARImage(void)
 
345
ModuleExport unsigned long RegisterVICARImage(void)
348
346
{
349
347
  MagickInfo
350
348
    *entry;
462
460
  */
463
461
  (void) ResetMagickMemory(header,' ',MaxTextExtent);
464
462
  (void) FormatMagickString(header,MaxTextExtent,
465
 
    "LBLSIZE=%.20g FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
466
 
    "RECSIZE=%.20g ORG='BSQ' NL=%.20g NS=%.20g NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
467
 
    "NLB=0 TASK='ImageMagick'",(double) MaxTextExtent,(double) image->columns,
468
 
    (double) image->rows,(double) image->columns);
 
463
    "LBLSIZE=%lu FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
 
464
    "RECSIZE=%lu ORG='BSQ' NL=%lu NS=%lu NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
 
465
    "NLB=0 TASK='ImageMagick'",(unsigned long) MaxTextExtent,image->columns,
 
466
    image->rows,image->columns);
469
467
  (void) WriteBlob(image,MaxTextExtent,(unsigned char *) header);
470
468
  /*
471
469
    Write VICAR pixels.
475
473
  if (quantum_info == (QuantumInfo *) NULL)
476
474
    ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
477
475
  pixels=GetQuantumPixels(quantum_info);
478
 
  for (y=0; y < (ssize_t) image->rows; y++)
 
476
  for (y=0; y < (long) image->rows; y++)
479
477
  {
480
478
    p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
481
479
    if (p == (const PixelPacket *) NULL)
485
483
    count=WriteBlob(image,length,pixels);
486
484
    if (count != (ssize_t) length)
487
485
      break;
488
 
    status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
489
 
                image->rows);
 
486
    status=SetImageProgress(image,SaveImageTag,y,image->rows);
490
487
    if (status == MagickFalse)
491
488
      break;
492
489
  }