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

« back to all changes in this revision

Viewing changes to wand/wandtest.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:
397
397
    *fill,
398
398
    **pixels;
399
399
 
400
 
  register ssize_t
 
400
  register long
401
401
    i;
402
402
 
 
403
  size_t
 
404
    length;
 
405
 
403
406
  unsigned char
404
407
    *profile;
405
408
 
406
409
  unsigned int
407
410
    status;
408
411
 
409
 
  size_t
 
412
  unsigned long
410
413
    columns,
411
414
    delay,
412
 
    length,
413
415
    number_options,
414
416
    number_profiles,
415
417
    number_properties,
447
449
  if (status == MagickFalse)
448
450
    ThrowAPIException(magick_wand);
449
451
  if (MagickGetNumberImages(magick_wand) != 5)
450
 
    (void) fprintf(stderr,"read %.20g images; expected 5\n",
451
 
      (double) MagickGetNumberImages(magick_wand));
 
452
    (void) fprintf(stderr,"read %lu images; expected 5\n",
 
453
      (unsigned long) MagickGetNumberImages(magick_wand));
452
454
  (void) fprintf(stdout,"Iterate forward...\n");
453
455
  MagickResetIterator(magick_wand);
454
456
  while (MagickNextImage(magick_wand) != MagickFalse)
455
 
    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
456
 
      MagickGetIteratorIndex(magick_wand),(double)
457
 
      MagickGetImageScene(magick_wand));
 
457
    (void) fprintf(stdout,"index %ld scene %lu\n",
 
458
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
458
459
  (void) fprintf(stdout,"Iterate reverse...\n");
459
460
  while (MagickPreviousImage(magick_wand) != MagickFalse)
460
 
    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
461
 
      MagickGetIteratorIndex(magick_wand),(double)
462
 
      MagickGetImageScene(magick_wand));
 
461
    (void) fprintf(stdout,"index %ld scene %lu\n",
 
462
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
463
463
  (void) fprintf(stdout,"Remove scene 1...\n");
464
464
  (void) MagickSetIteratorIndex(magick_wand,1);
465
465
  clone_wand=MagickGetImage(magick_wand);
468
468
    ThrowAPIException(magick_wand);
469
469
  MagickResetIterator(magick_wand);
470
470
  while (MagickNextImage(magick_wand) != MagickFalse)
471
 
    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
472
 
      MagickGetIteratorIndex(magick_wand),(double)
473
 
      MagickGetImageScene(magick_wand));
 
471
    (void) fprintf(stdout,"index %ld scene %lu\n",
 
472
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
474
473
  (void) fprintf(stdout,"Insert scene 1 back in sequence...\n");
475
474
  (void) MagickSetIteratorIndex(magick_wand,0);
476
475
  status=MagickAddImage(magick_wand,clone_wand);
478
477
    ThrowAPIException(magick_wand);
479
478
  MagickResetIterator(magick_wand);
480
479
  while (MagickNextImage(magick_wand) != MagickFalse)
481
 
    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
482
 
      MagickGetIteratorIndex(magick_wand),(double)
483
 
      MagickGetImageScene(magick_wand));
 
480
    (void) fprintf(stdout,"index %ld scene %lu\n",
 
481
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
484
482
  (void) fprintf(stdout,"Set scene 2 to scene 1...\n");
485
483
  (void) MagickSetIteratorIndex(magick_wand,2);
486
484
  status=MagickSetImage(magick_wand,clone_wand);
489
487
    ThrowAPIException(magick_wand);
490
488
  MagickResetIterator(magick_wand);
491
489
  while (MagickNextImage(magick_wand) != MagickFalse)
492
 
    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
493
 
      MagickGetIteratorIndex(magick_wand),(double)
494
 
      MagickGetImageScene(magick_wand));
 
490
    (void) fprintf(stdout,"index %ld scene %lu\n",
 
491
      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
495
492
  (void) fprintf(stdout,"Apply image processing options...\n");
496
493
  status=MagickCropImage(magick_wand,60,60,10,10);
497
494
  if (status == MagickFalse)
570
567
  MagickResetIterator(magick_wand);
571
568
  while (MagickNextImage(magick_wand) != MagickFalse)
572
569
  {
573
 
    (void) MagickSetImageDepth(magick_wand,8);
574
 
    (void) MagickSetImageCompression(magick_wand,RLECompression);
 
570
    MagickSetImageDepth(magick_wand,8);
 
571
    MagickSetImageCompression(magick_wand,RLECompression);
575
572
  }
576
573
  MagickResetIterator(magick_wand);
577
574
  (void) MagickSetIteratorIndex(magick_wand,4);
626
623
  options=MagickGetOptions(magick_wand,"*",&number_options);
627
624
  if (options != (char **) NULL)
628
625
    {
629
 
      for (i=0; i < (ssize_t) number_options; i++)
 
626
      for (i=0; i < (long) number_options; i++)
630
627
      {
631
628
        (void) fprintf(stdout,"  %s\n",options[i]);
632
629
        options[i]=(char *) MagickRelinquishMemory(options[i]);
652
649
  properties=MagickGetImageProperties(magick_wand,"*",&number_properties);
653
650
  if (properties != (char **) NULL)
654
651
    {
655
 
      for (i=0; i < (ssize_t) number_properties; i++)
 
652
      for (i=0; i < (long) number_properties; i++)
656
653
      {
657
654
        (void) fprintf(stdout,"  %s\n",properties[i]);
658
655
        properties[i]=(char *) MagickRelinquishMemory(properties[i]);
678
675
  profiles=MagickGetImageProfiles(magick_wand,"*",&number_profiles);
679
676
  if (profiles != (char **) NULL)
680
677
    {
681
 
      for (i=0; i < (ssize_t) number_profiles; i++)
 
678
      for (i=0; i < (long) number_profiles; i++)
682
679
      {
683
680
        (void) fprintf(stdout,"  %s\n",profiles[i]);
684
681
        profiles[i]=(char *) MagickRelinquishMemory(profiles[i]);