|
I have worked with QIMGCVTI API
Convert an TIF Image to AFP Spool File
***************************************************************
*
* Program: Convert Streamfile /dir/subdir/STMF (TIFF File)
* to Streamfile /dir/subdir/STMF (AFP File)
*
* Language: ILE RPG
* 1.) Compile this source member as module CVTTIF(PDM=Option=15)
*
* 2.) Create programm CVTTIF from module CVTTIF(PDM=Option=26)
* with PROMPT(PF4) and BNDSRVPGM((QSYS/QIMGCIMG)
*
* - API Serviceprogramm (QIMGCIMG)
***************************************************************
* Structure from QSYSINC/QRPGLESRC QIMGAPII
****************************************************************
*Structure for Control Structure
****
*NOTE: The following type definition only defines the fixed
* portion of the format. Any varying length fields must
* be defined by the user.
D****************************************************************
DQIMC0100 DS
D* Qimg IMGC0100
D QIMSL 1 4B 0 INZ(100)
D* Struct Len
D QIMSF 5 12 INZ('IMGC0100')
D* Struct Fmt
D QIMATION 13 16B 0 INZ(0)
D* Operation
D QIMAH 17 48
D* Append Handle
D QIMFL 49 52B 0 INZ(0)
D* Fb Len
D QIMFSF 53 60 INZ(' ')
D* Fb Struct Fmt
D QIMVERSE 61 64B 0 INZ(0)
D* Reverse
D QIMCR 65 68B 0 INZ(0)
D* Color Reduce
D QIMESIZE 69 72B 0 INZ(0)
D* Resize
D QIMRETCH 73 76B 0 INZ(0)
D* Stretch
D QIMHJ 77 80B 0 INZ(0)
D* H Just
D QIMVJ 81 84B 0 INZ(0)
D* V Just
D QIMKC 85 88B 0 INZ(1)
D* Keep Color
D QIMKQ 89 92B 0 INZ(1)
D* Keep Quality
D QIMANCEL 93 96B 0 INZ(0)
D* Cancel
D QIMSL00 97 100B 0 INZ(0)
D* Sev Level
D****************************************************************
D*Structure for IMGI0100 format
D****
D*NOTE: The following type definition only defines the fixed
D* portion of the format. Any varying length fields must
D* be defined by the user.
D****************************************************************
DQIMI0100 DS
D* Qimg IMGI0100
D QIMSL01 1 4B 0 INZ(101)
D* Struct Len
D QIMSF00 5 12 INZ('IMGI0100')
D* Struct Fmt
D QIMICO 13 22
D* RESERVED must be set to 0x00
D QIMICOL 23 32
D* RESERVED must be set to 0x00
D QIMDSF 33 36B 0 INZ(0)
D* Data Strm Fmt
D QIMPI 37 40B 0 INZ(0)
D* Photo I
D QIMRU 41 44B 0 INZ(0)
D* Res Unit
D QIMHRES 45 48B 0 INZ(0)
D* H Res
D QIMVRES 49 52B 0 INZ(0)
D* V Res
D QIMOT 53 56B 0 INZ(0)
D* Obj Typ
D QIMONO 57 60B 0 INZ(68)
D* Obj Nam Ofs
D QIMONL 61 64B 0 INZ(33)
D* Obj Nam Len
D QIMRSV1 65 68B 0 INZ(X'00000000')
D* RESERVED must be set to 0x00
D QIMON 69 101
D*
D* Varying length
D****************************************************************
D*Structure for IMGO0100 format
D****
D*NOTE: The following type definition only defines the fixed
D* portion of the format. Any varying length fields must
D* be defined by the user.
D****************************************************************
DQIMO0100 DS
D* Qimg IMGO0100
D QIMSL04 1 4B 0 INZ(177)
D* Struct Len
D QIMSF03 5 12 INZ('IMGO0100')
D* Struct Fmt
D QIMICO02 13 22 INZ('*IMGC02 ')
D* Img Cfg Obj
D QIMICOL02 23 32
D* RESERVED must be set to 0x00
D QIMDSF02 33 36B 0 INZ(20)
D* Data Strm Fmt
D QIMPI02 37 40B 0 INZ(0)
D* Photo I
D QIMRU02 41 44B 0 INZ(0)
D* Res Unit
D QIMHRES02 45 48B 0 INZ(0)
D* H Res
D QIMVRES02 49 52B 0 INZ(0)
D* V Res
D QIMSU 53 56B 0 INZ(-2)
D* Siz Unit
D QIMHSIZ 57 64P 5 INZ(0)
D* H Siz
D QIMVSIZ 65 72P 5 INZ(0)
D* V Siz
D QIMCT 73 76B 0 INZ(0)
D* Cpr Typ
D QIMCQ 77 80B 0 INZ(0)
D* Cpr Qual
D QIMBS 81 84B 0 INZ(0)
D* Bit Smp
D QIMPS 85 88B 0 INZ(27)
D* Ppr Siz
D QIMUPSU 89 92B 0 INZ(0)
D* Usr Ppr Siz Unit
D QIMHUPS 93 100P 5 INZ(0)
D* H Usr Ppr Siz
D QIMVUPS 101 108P 5 INZ(0)
D* V Usr Ppr Siz
D QIMPO 109 112B 0 INZ(-1)
D* Ppr Ori
D QIMLB 113 116B 0 INZ(-1)
D* Left Border
D QIMRB 117 120B 0 INZ(-1)
D* Right Border
D QIMTB 121 124B 0 INZ(-1)
D* Top Border
D QIMBB 125 128B 0 INZ(-1)
D* Bottom Border
D QIMOT00 129 132B 0 INZ(0)
D* Obj Typ
D QIMONO00 133 136B 0 INZ(144)
D* Obj Nam Ofs
D QIMONL00 137 140B 0 INZ(33)
D* Obj Nam Len
D QIMRSV100 141 144B 0 INZ(X'00000000')
D* RESERVED must be set to 0x00
D QIMON00 145 177
D*
D* Varying length
D****************************************************************
D*Structure for IMGO0300 format
D****
D*NOTE: The following type definition only defines the fixed
D* portion of the format. Any varying length fields must
D* be defined by the user.
D****************************************************************
DQIMO0300 DS
D* Qimg IMGO0300
D QIMSL06 1 4B 0 INZ(132)
D* Struct Len
D QIMSF05 5 12 INZ('IMGO0300')
D* Struct Fmt
D QIMICO04 13 22
D* Img Cfg Obj
D QIMICOL04 23 32
D* RESERVED must be set to 0x00
D QIMDSF04 33 36B 0
D* Data Strm Fmt
D QIMPI04 37 40B 0
D* Photo I
D QIMRU04 41 44B 0
D* Res Unit
D QIMHRES04 45 48B 0
D* H Res
D QIMVRES04 49 52B 0
D* V Res
D QIMSU01 53 56B 0
D* Siz Unit
D QIMHSIZ01 57 64P 5
D* H Siz
D QIMVSIZ01 65 72P 5
D* V Siz
D QIMCT01 73 76B 0
D* Cpr Typ
D QIMCQ01 77 80B 0
D* Cpr Qual
D QIMBS01 81 84B 0
D* Bit Smp
D QIMPS01 85 88B 0 INZ(26)
D* Ppr Siz
D QIMUPSU01 89 92B 0
D* Usr Ppr Siz Unit
D QIMHUPS01 93 100P 5
D* H Usr Ppr Siz
D QIMVUPS01 101 108P 5
D* V Usr Ppr Siz
D QIMPO01 109 112B 0
D* Ppr Ori
D QIMLB01 113 116B 0
D* Left Border
D QIMRB01 117 120B 0
D* Right Border
D QIMTB01 121 124B 0
D* Top Border
D QIMBB01 125 128B 0
D* Bottom Border
D QIMSP 129 132B 0 INZ(2048)
D* Space Prov
D****************************************************************
D*Structure for IMGF0100 format Feedback
D****
D*NOTE: The following type definition only defines the fixed
D* portion of the format. Any varying length fields must
D* be defined by the user.
D****************************************************************
DQIMF0100 DS
D* Qimg IMGF0100
D QIMAH00 1 32
D* Append Handle
D QIMSN00 33 42
D* Splf Nam
D QIMJN 43 52
D* Job Nam
D QIMJUN 53 62
D* Job User Nam
D QIMJNBR 63 68
D* Job Number
D QIMSNBR00 69 72B 0
D* Splf Num
D QIMIJI00 73 88
D* Internal Job Id
D QIMISI00 89 104
D* Internal Splf Id
D QIMODSL 105 108B 0
D* Output Data Strm Len
D*****************************************************************
D*Record structure for Error Code Parameter
D**** ***
D*NOTE: The following type definition only defines the fixed
D* portion of the format. Verying length field Exception
D* Data will not be defined here.
D*****************************************************************
DQUSEC DS
D* Qus EC
D QUSBPRV 1 4B 0
D* Bytes Provided
D QUSBAVL 5 8B 0
D* Bytes Available
D QUSEI 9 15
D* Exception Id
D QUSERVED 16 16
D* Reserved
D*QUSED01 17 17
D*
D* Varying length
D Ext_APIError DS
D BytesProvided 9B 0 Inz( 272 )
D BytesAvail 9B 0 Inz( *Zero )
D MsgID 7 Inz( *Blanks )
D Reserved 1 Inz( *Blanks )
D MsgDta 256 Inz( *Blanks )
* - Konstanten und Felder
DQMAINI01 S 4 INZ(X'00000000')
* - Input Streamfile
D In_Path S 33
* - Output Streamfile
D Out_Path S 33
* - API Serviceprogramm (QIMGCIMG)
D Image PR extproc('QimgCvtImg')
D ControlS LIKE(QIMC0100)
D InputImageS LIKE(QIMI0100)
D MainStgS LIKE(QMAINI01)
D OutputStGS LIKE(QIMO0100)
D MainStgOS LIKE(QIMO0300)
D Feedback LIKE(QIMF0100)
D APIError 272 options( *NoPass )
C *ENTRY PLIST
C PARM In_Path
C PARM Out_Path
C*
C* Start of mainline
C*
* Set Variable to Hexadecimal zeros
C MOVE *ALLx'00' QIMAH
C MOVE *ALLx'00' QIMICO
C MOVE *ALLx'00' QIMICOL
C MOVE *ALLx'00' QIMICOL02
* Set Path input / output Streamfile
C eval QIMON = In_Path
C eval QIMON00 = Out_Path
C eval QIMONL = %len(%TRIMR(In_Path))
C eval QIMONL00 = %len(%TRIMR(Out_Path))
C eval QIMSL01 = QIMONO + QIMONL
C eval QIMSL04 = QIMONO00 + QIMONL00
C CALLP Image( QIMC0100
C : QIMI0100
C : QMAINI01
C : QIMO0100
C : QIMO0300
C : QIMF0100
C : Ext_APIError)
* Falls Fehler zu analysieren Statement aktivieren
* MSGID DSPLY
c eval *INLR = *ON
_____________________________________________________
ZAPF GmbH
Burkhard Quindt
Nürnberger Str. 38
D-95440 Bayreuth
tel +49 921 601-557 fax +49 921 601-80557
email: b.quindt@xxxxxxxxxxxx http://www.zapf-gmbh.de
______________________________________________________
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.