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

« back to all changes in this revision

Viewing changes to coders/cals.c

  • Committer: Bazaar Package Importer
  • Author(s): Nelson A. de Oliveira
  • Date: 2010-06-20 19:59:55 UTC
  • mfrom: (6.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100620195955-n3eq0yenhycw888i
Tags: 7:6.6.2.6-1
* New upstream release;
* Change Recommends on ufraw to ufraw-batch (Closes: #579775);
* Fix FTBFS when using dash to run the configure script, by setting
  CONFIG_SHELL=/bin/bash (Closes: #582073, #583024). Thank you, Niko Tyni!

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
%                                 July 1992                                   %
18
18
%                                                                             %
19
19
%                                                                             %
20
 
%  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization      %
 
20
%  Copyright 1999-2010 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  %
66
66
#include "magick/string_.h"
67
67
#include "magick/module.h"
68
68
 
 
69
#if defined(MAGICKCORE_TIFF_DELEGATE)
69
70
/*
70
71
 Forward declarations.
71
72
*/
72
73
static MagickBooleanType
73
74
  WriteCALSImage(const ImageInfo *,Image *);
 
75
#endif
74
76
 
75
77
/*
76
78
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
161
163
  MagickBooleanType
162
164
    status;
163
165
 
164
 
  register long
 
166
  register ssize_t
165
167
    i;
166
168
 
167
169
  unsigned long
226
228
            if (pel_path == 90)
227
229
              orientation=5;
228
230
            else
229
 
              if (pel_path == 90)
 
231
              if (pel_path == 180)
230
232
                orientation=3;
231
233
              else
232
234
                if (pel_path == 270)
301
303
%
302
304
%  The format of the RegisterCALSImage method is:
303
305
%
304
 
%      unsigned long RegisterCALSImage(void)
 
306
%      size_t RegisterCALSImage(void)
305
307
%
306
308
*/
307
 
ModuleExport unsigned long RegisterCALSImage(void)
 
309
ModuleExport size_t RegisterCALSImage(void)
308
310
{
309
311
  MagickInfo
310
312
    *entry;
312
314
  static const char
313
315
    *CALSDescription=
314
316
    {
315
 
      "Continuous Acquisition and Life-cycle Support Type 1 Image"
 
317
      "Continuous Acquisition and Life-cycle Support Type 1"
316
318
    },
317
319
    *CALSNote=
318
320
    {
369
371
  (void) UnregisterMagickInfo("CALS");
370
372
}
371
373
 
 
374
#if defined(MAGICKCORE_TIFF_DELEGATE)
372
375
/*
373
376
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374
377
%                                                                             %
407
410
  register const char
408
411
    *p;
409
412
 
410
 
  register long
 
413
  register ssize_t
411
414
    i;
412
415
 
413
416
  i=0;
441
444
  MagickBooleanType
442
445
    status;
443
446
 
444
 
  register long
 
447
  register ssize_t
445
448
    i;
446
449
 
447
450
  ssize_t
453
456
  unsigned char
454
457
    *group4;
455
458
 
456
 
  unsigned long
 
459
  size_t
457
460
    density,
458
461
    orient_x,
459
462
    orient_y;
529
532
    }
530
533
  }
531
534
  (void) FormatMagickString(header,MaxTextExtent,"rorient: %03ld,%03ld",
532
 
    orient_x,orient_y);
 
535
    (long) orient_x,(long) orient_y);
533
536
  count=WriteCALSRecord(image,header);
534
537
  (void) FormatMagickString(header,MaxTextExtent,"rpelcnt: %06lu,%06lu",
535
 
    image->columns,image->rows);
 
538
    (unsigned long) image->columns,(unsigned long) image->rows);
536
539
  count=WriteCALSRecord(image,header);  
537
540
  density=200;
538
541
  if (image_info->density != (char *) NULL)
541
544
        geometry_info;
542
545
 
543
546
      (void) ParseGeometry(image_info->density,&geometry_info);
544
 
      density=(unsigned long) (geometry_info.rho+0.5);
 
547
      density=(size_t) floor(geometry_info.rho+0.5);
545
548
    }
546
 
  (void) FormatMagickString(header,MaxTextExtent,"rdensty: %04lu",density);
 
549
  (void) FormatMagickString(header,MaxTextExtent,"rdensty: %04lu",
 
550
    (unsigned long) density);
547
551
  count=WriteCALSRecord(image,header);
548
552
  count=WriteCALSRecord(image,"notes: NONE");
549
553
  (void) ResetMagickMemory(header,' ',128);
576
580
  (void) CloseBlob(image);
577
581
  return(status);
578
582
}
 
583
#endif