| |
|
|
Uwe ''Pascal'' Niemeier | Hi people!
here a Possibility, over WIA-Objects from several Images one Multipage-TIFF to create:
window 600,600
$H windows.ph
$H ocx3a.ph
$I ocx3a.inc
$I ocxInfo3a.inc
ocxInit()
'
def $wiaFormatTIFF "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}"'--* Has-Constant for TIFF-stature
'
var Pic1$="C:\1Test\Image1.gif"'--Existierende Images
var Pic2$="C:\1Test\Image2.gif"'--Paths Please adjust!
var Pic3$="C:\1Test\Image3.gif"'--Bildtypen are alike
'
var target$="C:\1Test\Image.tiff"'--Anzulegende File (must not yet existieren)
'
var Page1&=ocxCreate("WIA.ImageFile")'--ImageObjekte
var Page2&=ocxCreate("WIA.ImageFile")
var Page3&=ocxCreate("WIA.ImageFile")
'
ocxMethod(Page1&,"LoadFile",Pic1$)'----Images loading
ocxMethod(Page2&,"LoadFile",Pic2$)
ocxMethod(Page3&,"LoadFile",Pic3$)
'
var ImageProcess&=ocxCreate("WIA.ImageProcess")'-------ImageProcess-Objekt
var Filters&=ocxGet(ImageProcess&,"Filters")'----------active filter (yet empty)
var FilterInfos&=ocxGet(ImageProcess&,"FilterInfos")'--available filter
'
'--------------------------------------------------------------------filter select
declare FilterInfo&,ID$
'
FilterInfo&=ocxGet(FilterInfos&,"Item","Frame")'----About "Frame"-filter
ID$=ocxGet(FilterInfo&,"FilterID")'-----------------ID of it
ocxMethod(Filters&,"Add",ID$)'----------------------1. filter "Frame" To active Filtern add
ocxMethod(Filters&,"Add",ID$)'----------------------2. filter "Frame" To active Filtern add
ocxRelease(FilterInfo&)
'
FilterInfo&=ocxGet(FilterInfos&,"Item","Convert")'--About "Convert"-filter
ID$=ocxGet(FilterInfo&,"FilterID")'-----------------ID of it
ocxMethod(Filters&,"Add",ID$)'----------------------3. filter "Convert" To active Filtern add
ocxRelease(FilterInfo&)
'
ocxRelease(FilterInfos&)
'
'--------------------------------------------------------------------filter-Parameter settle
declare Filter&,Property&
'
Filter&=ocxGet(Filters&,"Item",1)'-------------------filter 1 ("Frame")
Property&=ocxGet(Filter&,"Properties","ImageFile")'--quality "ImageFile"
ocxPut(Property&,"Value",Page2&)'--------------------On Page 2 settle
ocxRelease(Property&,Filter&)
'
Filter&=ocxGet(Filters&,"Item",2)'-------------------filter 2 ("Frame")
Property&=ocxGet(Filter&,"Properties","ImageFile")'--quality "ImageFile"
ocxPut(Property&,"Value",Page3&)'--------------------On Page 3 settle
ocxRelease(Property&,Filter&)
'
Filter&=ocxGet(Filters&,"Item",3)'-------------------filter 3 ("Convert")
Property&=ocxGet(Filter&,"Properties","FormatID")'---quality "FormatID"
ocxPut(Property&,"Value",$wiaFormatTIFF)'------------On * Has of TIFF settle
ocxRelease(Property&,Filter&)
'
'--------------------------------------------------------------------filter utilize + Save
var Image&=ocxMethod(ImageProcess&,"Apply",Page1&)'--On Page 1 utilize > New Image-Objekt
ocxMethod(Image&,"SaveFile",target$)'------------------Save
'
ocxRelease(Page3&,Page2&,Page1&)'-----------straighten up
ocxRelease(Image&,ImageProcess&,Filters&)'--straighten up
ocxDeInit()
'
print "Fertig"
waitkey
Info: for the Convert-filter can theoretical different Kompressionsverfahren einstellen; in the practice go but only "LZW" (Standart) or "Uncompressed" unterstützt; can but too systemabhängig his.
SeeYou Pascal
Edit: mistake in writing in the code korrigiert |
|
|
| |
|
|
|
Dieter Zornow | so integrally functions it by me unfortunately not. I have 3 same large JPG Images. it'll one 3 Images Tiff prepares, but the 2. becomes 2 time eingefügt and the 3. none. have it with several Images attempts, on whom Images lying not. |
|
|
| XProfan X2Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 11/16/11 ▲ |
|
|
|
|
Uwe ''Pascal'' Niemeier | Hi Dieter!
mistake in writing for may part
the 1. and 2. filter watts the same Image (Page 2) zugeordnet. Errors in the code is now korrigiert!
SeeYou Pascal |
|
|
| |
|
|
|
| have The Includes ocx3a.inc and ocxInfo3a.inc time as "constantly important Includes" Includes angepinnt: [...] |
|
|
| |
|
|