| |
|
|
Thomas Freier | The Examples of Andreas [...] are so right in detail. unfortunately find I no example for a MultiTiff to create, and my try ended in the Einzelbild or nothing. who knows itself so from and can help? A small Grundgerüst and Andreas Files:
'Multipage Tif's Show:
'Andreas Miethe * february 2004
'##############################
$H windows.ph
$H Functions_GDIPLUS.ph
$H GDIP_Imageging.ph
$I GDIP_Helper.inc
Declare gdiplusToken&,ImageObject&,GraphicObject&,Count&,X&,XX&,YY&,SIO&
Declare ImageWidth&,ImageHeight&,File$
Declare GUID#
Window 800,600
CLS ~GetSysColor(~COLOR_3DFACE)
gdiplusToken& = InitGDIPlus()'GDIPlus started
PopUp "Datei"
AppendMenu 109,"Bild öffnen"
AppendMenu 110,"Neues Image Image 1+2"
Proc ImageObject
Parameters x&
declare a$
MCls 800, 600 , ~GetSysColor(~COLOR_3DFACE)
MCopyBmp 0,0 - 800,600 > 0,30; 0
ImageObject& = gdipLoadImage(File$)'Load image
~GdipCreateFromHWND(%hwnd,ADDR(GraphicObject&))
Dim GUID#,32
~GdipImageGetFrameDimensionsList(ImageObject&,GUID#,1)
~GdipImageGetFrameCount(ImageObject&,GUID#,Addr(Count&))
Settext %hwnd,"Bilder in the Multiframe : "+st$(Count&)
~GdipImageSelectActiveFrame(ImageObject&,GUID#,X&)
SaveAsPNG(ImageObject&,"Bild "+st$(x&)+".png")
~GdipDrawImageI(GraphicObject&,ImageObject&,30,30)
Dispose GUID#
~GdipDisposeImage(ImageObject&)
~GdipDeleteGraphics(GraphicObject&)
Endproc
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Proc NeuMultiImage
Parameters file$
Declare ImageID1&, ImageID2&
'BEISPIEL *******************************************************
' // Get the * Has of the TIFF encoder.
' EncoderClsid = GUID$(GdiPlusGetEncoderClsid("image/tiff"))
' // Create three image objects.
' strFileName = UCODE$("Shapes.bmp")
' hStatus = GdipLoadImageFromFile(STRPTR(strFileName), pMulti)
' strFileName = UCODE$("Iron.jpg")
' hStatus = GdipLoadImageFromFile(STRPTR(strFileName), pPage2)
' // Save the first page (frame).
' parameterValue = %EncoderValueMultiFrame
' strFileName = UCODE$("Multiframe.tif")
' hStatus = GdipSaveImageToFile(pMulti, STRPTR(strFileName), EncoderClsid, eps)
' IF hStatus = %StatusOk THEN PRINT "Page 1 saved successfully"
' // Save the second page (frame).
' parameterValue = %EncoderValueFrameDimensionPage
' hStatus = GdipSaveAddImage(pMulti, pPage2, eps)
' IF hStatus = %StatusOk THEN PRINT "Page 2 saved successfully"
' // Close the multiframe file.
' parameterValue = %EncoderValueFlush
' hStatus = GdipSaveAdd(pMulti, eps)
' IF hStatus = %StatusOk THEN PRINT "File closed successfully"
'****************************************************************
ImageID1& = gdipLoadImage("Bild 0.png")
ImageID1& = gdipLoadImage("Bild 1.png")
~GdipDisposeImage(ImageID1&)
~GdipDisposeImage(ImageID2&)
ENDPROC
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Datei$="MultiFrame.tif"
ImageObject 0
var x%=0
var butz%=CreateButton(%hwnd,"<",30,5,20,20)
var butv%=CreateButton(%hwnd,">",60,5,20,20)
while 0=0
Waitinput
if GetFocus(butz%) AND (x%>0)
dec x%
ImageObject x%
SetFocus(%hwnd)
Elseif GetFocus(butv%) AND (x%<Count&-1)
inc x%
ImageObject x%
SetFocus(%hwnd)
Elseif MenuItem(109)
File$ = @LoadFile $("ÖFFNE","Bild|*.Tif")
If len(trim$(File$))>0
ImageObject 0
x%=0
EndIf
EndIf
case MenuItem(110): NeuMultiImage "ZweiMulti.tif"
wend
DeleteObject bmp&
ExitGDIPlus(gdiplusToken&)
End
|
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 11/14/11 ▲ |
|
|
|
|
Andreas Miethe
| Hello Thomas,
if you a little bit patience have, then make I you The days time an example. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 11/14/11 ▲ |
|
|
|
|
Thomas Freier | thanks Andreas. Time game no role. |
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 11/14/11 ▲ |
|
|
|
|
Uwe ''Pascal'' Niemeier | Hi people!
Perhaps time here bad: [...]
SeeYou Pascal |
|
|
| |
|
|
|
Thomas Freier | How always a nice alternative. be first to the Nachrüstung the wiaaut.dll To Ergebnissen come. there hope I but, that The gdipluss.dll always on all BS To WIN7 already present is, otherwise I get a problem. |
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 11/16/11 ▲ |
|
|
|
|
Thomas Freier | Andreas has the example with gdi+ ready.[...] Thank you! |
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 08/20/12 ▲ |
|
|
|