1、 STD-BSI BS ISO/IEC 12088-4-ENGL 1775 1b24bb7 Ob28157 300 BRITISH STANDARD Information technology - Computer graphics and image processing - Image processing and interchange - Application program interface language bindings Part 4. C ICs 35.060; 35.140 BS ISO/IEC 12088-4 : 1995 NO COPYING WITHOUT BS
2、I PERMISSION EXCEPT AS PERMITTED BY COPYRIGHT LAW STD-BSI BS ISO/IEC 12088-9-ENGL 1775 Lb2Ybb7 Ob28158 297 M md. No. BS ISO/IEC 12088-4 : 1995 Date Text affected National foreword This British Standard reproduces verbatim ISO/IEC 120884 : 1995 and implements it as the UK national standard. The UK pa
3、rticipation in its preparation was entrusted to Technical Committee ISTB1, Computer graphics and image processing, which has the responsibility to: - aid enquirers to understand the text; - present to the responsible inkrnationalBuropean committee any enquiries on the interpretation, or propods for
4、change, and keep the UK interests informed; - monitor related international and European developments and promulgate them in the UK A list of organizations represented on this committee can be obtained on request. Cross-references The British Standards which implement international or European publi
5、cations referred to in this document may be found in the BSI Standards Catalogue under the section entitled International stcuidards Correspondence Index, or using the Find facility of the BSI Standards Electronic Catalogue. Compliance with a British Standard does not of itself confer immunity from
6、legal obligations. Summary of pages This document comprises a front cover, an inside front cover, the ISO/iEC title page, pages ii to viii, pages 1 to 613 and a back cover. This British Standard, having been prepared under the direction of the DISC Board, was published under the authority of the Sta
7、ndards Board and comes into effect on 15 May 1997 O BSI 1997 ISBN O 680 27286 9 Amendments issued since publication BS ISO/IEC 12088-4 : 1995 INTERNATIONAL STANDARD ISO/IEC 12088-4 First edition 19951 2-1 5 Information technology - Computer graphics and image processing - Image processing and interc
8、hange - Application program interface language bindings - Part 4: C Technologies de linformation - Infographie et traitement de limage - Traitement et change de limage - Liants de langage dinterface de programme dapplication - Partie 4: C Reference number ISO/IEC 1208841995E) STD-BSI BS ISIIEC 12088
9、-q-ENGL 1775 9 Lb24bb Ob281b0 7T5 BS ISO/IEC 12088-4 : 1995 Contents Contents 1 scope 1 3.1 Classification and designation 3 3.2 Functions vea macros 3 3.3 Implications of the language 4 3.3.1 Character strings . 4 3 3.2 Implementation dependencies. 4 3.3.3 Data object repository . 4 3.4 Identifier
10、mapping . 5 3.5 Return values . 6 3.6 H&r files 6 3.7 Memory management . . 7 3.8.1 Application defined error handlers . . 9 3.8.2 Function identification . 9 3.8.3 Error presentation 9 3.10 Convenience functions . 10 3.1 I Program examples . 10 2 Normative references . . 2 3 The C language binding
11、of the Image Processing and Interchange Standard . 3 3.8 Error handling . 9 3.9 Virtual register support 10 4 Tables 4 . I Abbreviations . 11 4.1.1 Table of abbreviations . . 11 4.1.2 Abbreviation policy in construction of identifiers . 14 . 15 . 15 4.2.2 Alphabetical by bound name 27 5 Data wpe def
12、initions 39 5.1 Mapping of data types 39 5.2 Environment data type definitions 40 5.2.1 Extemai physical image data types 40 5.2.2 Basic parameter data types . 41 5.2.2.1 PI-PIKS parameter data types 41 4.2 Function names 1.2.1 Alphabetical by function name 5.2.2.2 IPI-IIF parameter data tyxs 41 5.2
13、.3 Data object identifiers 42 5.2.3.1 IPI-PIKS object identifiers . 42 5.2.3.2 IPI-IF object identification . 43 5.3 Implementation dependent data type definitions . 44 5.4 Implementation independent data ype definitions 45 5.4.1 Enumerated data type definitions . 45 5.4.1.1 IPI-PIKS enumerated data
14、 type definitions 45 5.4.1.2 IPl-IIF enumerated data type definitions 50 Descripton: data processing. information interchange. graphic data processing. image processing. computer interfaces. application .program interfaces. programming languages . C (programming language) . STD-BSI BS ISO/IEC 32088-
15、4-ENGL 3775 W lb24bb9 Ob283b3 833 BS ISO/IEC 12088-4 : 1995 contents 5.4.2 Union data type definitions 51 5.4.2.1 PI-PIKS union data type definitions . 51 5.4.2.2 PI-IIF union type data dennitions . 66 5.4.3 Structure data type denitions . 68 5.4.3.1 IPI-PW! stnictures . 68 5.4.3.2 IPI-IIF S&WZURS .
16、 83 6 Macro definitions . 87 6.1 Unbwnded option and status cades 87 6.1.1 PI-PIKS unbainded option and status codes . 87 6.1.2 PI-IIF unbwnded Option and status codes . 101 6.2 PI-IIF syntax descriptors . 103 6.2.1 PI-IR? syntax entity types 103 6.2.2 PI-IR? syntax components. 107 6.3 Function desc
17、riptors . 123 6.3.1 PI-PIKS function descriptors 123 6.3.3 PI-1IF function descriptors 136 6.4 Error descriptors 138 6.4.2 IPI-IF error . 143 6.4.3 System errors . 145 6.4.4 Binding-specific errors 145 6.5 Implementation-speafic data lengths . 146 6.6 Repository object dacnptors . -147 6.6.3 Reposit
18、ory colour conversion matrices . 149 7 C functional elements . 155 7.1 Notational conventions 155 7.2 IPI-PIKS functional element prototypes . 156 7.3 PI-IIF functioaal element prototypes . 273 8 Convenience functions . 282 8.1 PI-PIKS convenience functions . 282 8.1.1 Image preparation unc4ions 282
19、 8.1.1.1 prepare-colour-image . 283 8.1 . 1.2 prepare-monochrome-image 284 8.1.1.3 crerite-iinbaundad-image-capy . 285 8,1.2 ROI creation function . 287 8.1.2.1 Benetate_2d_roi_rectangular . 288 8.1.2.2 generate-roi-mrdimte 289 8.1.2.3 generate-roi-ellical -290 8.1.2.4 generate-roipygon . .A 291 8.1
20、.2.5 generate-roi-recangular . 293 8.1.2.6 prepre-2d-roi-ctaqph 294 8.1.2.7 prepate_roi 295 8.1.3 Tuple generation fnctions 2% 8.1.3.1 generate-mi-1-tuple . 297 8.1.3.2 generate-nd-3-tuple 298 8.1.3.3 generate_nd4tpIe . 299 8.1.3.5 gente-rd-3-tuple 301 8.1.3.6 generate_rd-4-tuple 302 8.1.3.7 ge1atd-
21、5-tuplle 303 6.3.2 IPI-PIKS amvenience function descriptors 135 6.3.4 PI-IR? convenience function descriptors 137 6.4.1 PI-PIKS error 138 6.6.1 Repository impulse response function arrays 147 6.6.2 Repository diher arrays . 149 8.1.3.4 generate_nd_5-tple . 300 . lll BS ISO/IEC 12088-4 : 1995 Content
22、s 8.1.3.8 generate-sd-1-tup . 304 8.1.3.9 generate-sd-3-tuple . 8. I .3.10 generate-sd-4-tuple 8.1.3.1 1 generate-sd-S-tu 8.1.4.1 tiled-image-expo . 308 8.1.4.2 tiled-image-impor . 300 8.2 IPI-IIF convenience functions. . 310 3 10 310 . 30s . 306 . 307 . 308 . 8.1.4 Tiled image import and 8.2.1 Atta
23、ch entity functions 8.2.1.1 attach . 8.2.1.2 attach-sequence . 8.2.1.3 attach-seque 8.2.2 Create identifier function 8.2.3 Get entity compo 8.2.4 Get entity value 3 12 312 313 . 3 I4 . . 8.2.4.5 get-sequence . 314 . 715 8.2.5 Put entis. value functions . 8.2.5.3 put-entity-real 31x 8.2.5.5 put-seque
24、nce-boolean . 8.2.5.6 put-sequence-integer 8.2.5.8 put-sequence-string Annexes A Memov management . 321 323 32s . 321 B. I. 1 Macro definitions . 367 B. 1.3 Functions . B. 1.4 Convenience fiinctions . .47S .480 B.2.1 Macro definitions . B.2.2 Data types in compilation order .a99 B.2.3 Functions . 5n
25、4 B. 2.4 Convenience functions . .5 1 0 A. 1 Introduction . A.2 Functions that import the application data to the implementation nie A.3 Functions that export the implementation data to the application memoty B. 1 IPI-PIKS macros. .pes and functions B.1.2 Data types in compilation order B Macros, da
26、ta types in compilation order and external functions B.2 IPI-IIF macros. types and inctions IV STD-BSI BS ISO/IEC L20AA-q-ENGL 1995 Lb29bb9 Ob28Lb3 bOLi m BS ISO/IEC 12088-4 : 1995 Contents C Sample programs . . s13 . s13 C. I. 1 Application use of IPI-PIKS for memory-managed image import/expor . 51
27、4 . SI9 C. I .7 Region of interest control 523 C. I .4 Simulated unsharp mask operation . 526 . 531 C. I .S. I Image blend by synchronous. unchained functional representation. C. 1.5.2 Iniage blend by asynchronous functional representation 533 C. 1.5.3 Image blend by chained functional representatio
28、n . 537 . S41 C. I IPI-PIKS application examples C. 1.2 Histogram generation . C. I .S Demonstration of asynchronous and C.2 IPI-IIF application example D Macros for short function identifiers 550 Indes . 562 V BS ISOAEC 12088-4 : 1995 Contents List of figures 1 - Buffered memory management ofInlmpo
29、rtImage( . .f24 2 - Buffered memory management ofInE?cponImage( . 726 List of tables 1 Data type prefixes 2 Abbreviations . 3 Function names alp 4 Function names al 5 Data .pes 8 IPI-IIF function descriptors 10 IPI-PIKS error descriptors 12 System error descriptors 14 IPI-PIKS data lengths . 16 Repo
30、sitory dither array indices . I49 17 Repository colour conversion matrix indices .27 . .1. . 7 IPI-PIKS convenience function descriptors . 9 IPI-IIF convenience function descriptors . 11 IPI-IIF error de 13 Binding-specific error descriptors . . I36 138 14s 146 149 vi * * m - STD-BSI BS ISO/IEC L208
31、8-4-ENGL 1775 lb24bb7 Ob281b5 487 m BS ISO/IEC 12088-4 : 1995 Fore word IS0 (the International Organization for Standardization) and IEC (the International Electrotezhnical Com- mission) form the specialized system for worldwide standardization. National bodies that are members of IS0 or IEC partici
32、pate in the development of International Standards through technical committees estab- lished by the respective organization to deal with particular fields of technical activity. IS0 and IEC tech- nical committees collaborate in fields of mutual interest. Other international organizations, governmen
33、tal and non-governmental, in liaison with IS0 and IEC, also take part in the work. In the field of information technology, IS0 and IEC have established a joint technical committee, ISO/IEC JTC 1. Draft international Standards adopted by the joint technical committee are circulated to national bodies
34、 for voting. Publication as an International Standard requires approval by at least 75 96 of the national bodies casting a vote. International Standard ISOOEC 12088-4 was prepared by Joint Technical Committee ISOOEC JTC 1, In- formation technology, Subcommittee SC 24, Computer graphics and image pro
35、cessing. ISO/IEC 12088 consists of the following part, under the general title Znfonnation technology - Computer graphics and image processing - Image processing and interchange - Application program interface language bindings: - Part4: C Other parts may follow. Annexes A to D of this part of ISO/I
36、EC 12088 are for information only. Vii STD-BSI BS-ISO/IEC 12088-4-ENGL 1995 1b24bb9 Ob28Lbb 311 = BS ISO/IEC 12088-4 : 1995 Introduction The Image Processing and Interchange (IPl) functional specification. ISO/IEC 12087. upon which this binding is based. emerged as an International Standard in 1994.
37、 It consists of three parts: Part 1: Common Architecture for Imaging (IPI-CAI). Part 2: Programmers Imaging Kernel Svstem (IPI-PIKS) Application Program Interface and Part 3: Image Interchange Facility (IPI-IIF). The functional description of ISO/IEC 12088 is specified in a language independent mann
38、er and needs to be embedded in language dependent layers (language bindings) for use with particular programming languages. The purpose of this part of ISO/IEC 12088 is to define a standard binding for the Image Processing and Interchange Standard in the C programming language. . vl11 BS ISO/IEC 120
39、88-4 : 1995 Information technology - Computer graphics and image processing - Image processing and interchange - Application program interface language bindings - Part 4: C 1 Scope ISO/IEC 12087 consists of the three parts which define the functional aspects of this part of ISOAEC i 2088. The Progra
40、mmers Imaging Kernel System (IPI-PIKS) and the Image Interchange Facility (IPI-IIF) each specifi a language independent. image processing Application Program Interface (MI) within the Image Processing and Interchange Standard. Either API may be implemented independently or both may be combined in on
41、e implementation. For integration into a programming language, IPI-PIKS and IPI-JIF APIS are embedded in a language dependent layer obeying the particular conventions of that language. This pari of ISO/IEC 12088 specifies such a language dependent layer for the C language. The Common Architecture fo
42、r Imaging (IPI-CAI) defines the overall architecture. 1 BS ISO/IEC 12088-4 : 1995 2 Normative references The following standards contain provisions which. through referencc in this text. constitute provisions of this part of ISOAEC 12088. At the time of publication. the editions indicated were valid
43、. A11 standards are subject to revision. and parties to agreements based on this part of ISOiEC i2088 arc encouraged to investigate the possibility of appling the most recent editions of the standards indicated below. Members of IEC and IS0 maintain registers of currently valid International Standar
44、ds. 11 ISOlIEC 12087-1 : 1995. Informotion technnlo,pv - iwtputer grnphics and imnw primwing - Itio Processing and Interchange (IPI) - Piinctionnl speccntion - Pori I: Cimmon archifectrirP,for imoginst?. 121 ISO/IEC 12087-2: 1994. Injbrmotion technologv - imputw graphics ont1 imnge processing - Ii?i
45、ng Processing and Interchange dPI) - Functional spcccation - Port 3: Progrommarb imaging kernel system application programme interface. 3 ISOAEC 12087-3:1995, Information technology - Computer graphics and image processing - Image Processing und Interchange IPI) - Functionol spec(tkotion - Pori 3: I
46、tn nging? InterchnnzFe Focilihl LW). 141 ISODEC 9899: 1990. Programming Lanpiages - I 2 * rn * STD-BSI BS ISOIIEC LZ!-r-ENGL- 1995 W 1bZqbbS b2Lb7 O22 BS ISO/IEC 12088-4 : 1995 The C language binding of the Image Processing and Interchange Standard 3 The C language binding of the Image Processing an
47、d Interchange Standard 3.1 Classification and designation This part of ISO/IEC 12088 incorporates the rules of conformance defined in the Image Processing and Interchange Standard (ISODEC 12087) for implementations. with those additional requirements specifically defined for C language implementatio
48、ns of the Standard. The following criteria shall determine conformance of an implementation of this part of ISOEC 12088: In order to conform, development of a C language implementation of the Image Prccessing and Interchange Standard shall implement one or more specific profiles as specified in the
49、functional specification of ISOAEC 12087. Independent implementation of the Programmers Imaging Kernel System (Part 2 of ISO/IEC 12087 including relevant portions of Part 1) or the Image Interchange Facility (Pan 3 of ISO/IEC 12087 including relevant portions of Part 1) is allowed. The implementation shall make visible all of the declarations in the C binding specified in this part of ISODEC 12088 for that same level of ISO/IEC 12087 and all lower levels and for a specific level of the C language. Thus. fo