English
Forum

GDI+ and MultiTif

 

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

181 kB
Hochgeladen:11/14/11
Downloadcounter165
Download
5 kB
Hochgeladen:11/14/11
Downloadcounter204
Download
9 kB
Hochgeladen:11/14/11
Downloadcounter217
Download
46 kB
Hochgeladen:11/14/11
Downloadcounter216
Download
 
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
 
11/16/11  
 




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  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.768 Views

Untitledvor 0 min.
ByteAttack10/12/15
iF05/11/15
Andre Rohland02/14/15
Magda08/31/14
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie