English
Source / code snippets

Animated Gifs

 

Walter
have ausgehend von [...] 
attempts, animated Gifs run out To let.
After some adjustments here now a gif.inc, The on the ursprünglichen pic.inc of Martin Pohl basiert.
so is it now possible, The Gif once or number of times or dauernd run out To let.
V1.1: Additional is now The Size the statement wählbar
further Improvements are gladly Welcome!

8 kB
Version:1.1
Hochgeladen:12/02/18
Downloadcounter160
Download
 
12/02/18  
 




Walter
so, here another example for V1.1 - complement around the mode, the The Size the Bilddarstellung piloting (plus a kl. GIF-File to that try):

' example for gif.inc V1.1
' Walter Kowarik
' 6.1.2019
'
declare way$,Image$,WieOft%,mode%

way$=GetDir$("")

$I gif.inc

' Load image
Image$=loadfile$("GIF auswählen",way$+"\*.gif")
WieOft%=val(input$("einmal=1, dauernd=0","Wie often?","0"))

cls
print "Modus: the Image\n0=in Rahmengröße (ev. verzerrt) displayed,\
\n1=unverzerrt into welt eingepasst,\n2=in the ursprünglicher Bildgröße displayed,\
\n3=ein small Image in Bildgröße displayed, \n one large unverzerrt into welt eingepasst"
mode%=val(input$("","Modus","3"))

cls
' possible already angewählte Bildnummer becomes vorsichtshalber closed
ClosePic(1)

' Animation becomes launched
LoadAnim(Image$,10,10,300,270,%Hwnd,1,WieOft%,mode%)

waitinput

ClosePic(1)
' or MCISend$("CLOSE ALL")

29 kB
Version:1.1
Hochgeladen:12/08/18
Downloadcounter210
Download
 
12/08/18  
 




Walter
Have a V1.1 prepares and therein yet whom mode complement (too already in the Download and in the example) by which certainly becomes, How the Gif-Image displayed becomes:

# is this Parameter 0, so becomes the image in the from the welt-rectangle indicated Size viewed (and thereby ggf. verzerrt)
# is it 1, becomes the ursprüngliche Seitenverhältnis to maintain and the image in the Size so adjusted, that it under Beibehaltung the Seitenverhältnisses into angegebene rectangle fit
# is it 2, becomes the image unverzerrt in its own Size displayed (and accordingly ggf cut)
# is it 3, so becomes the image - sofern it small as the welt is (zB one Smiley) - in its own Size dargestellt; is it larger as the welt, becomes it unverzerrt so far minimizes, that it into welt fit (this mode use myself usually, I Smileys display, but too others Images, The then into welt eingepasst go).
 
01/07/19  
 




Manfred
Barei
Hello Walter,

at next time Please so with code insert.
right next to Smilies is a down gerichteter arrow there Please draufklicken and on View source weg.
' example for gif.inc V1.1
' Walter Kowarik
' 6.1.2019
'
declare way$,Image$,WieOft%,mode%
pfad$=$ GetDir("")
 $I gif.inc
' Load image
Bild$=loadfile$("GIF auswählen",way$+"\*.gif")
WieOft%=val(input$("einmal=1, dauernd=0","Wie often?","0"))
cls
print "Modus: the Image\n0=in Rahmengröße (ev. verzerrt) displayed,\
\n1=unverzerrt in whom welt eingepasst,\n2=in the ursprünglicher Bildgröße displayed,\
\n3=one small Image becomes in Bildgröße displayed, \n one large unverzerrt in whom welt eingepasst"
Modus%=val(input$("","Modus","3"))
cls
' possible already angewählte Bildnummer becomes vorsichtshalber closed
ClosePic(1)
' Animation becomes launched
LoadAnim(Image$,10,10,300,270,%Hwnd,1,WieOft%,mode%)
waitinput
ClosePic(1)
' or MCISend$("CLOSE ALL")

Greeting
 
XProfan X2
Zu wenig Wissen ist gefärlich, zu viel auch.(XProfan X4) | Win 10 Pro 64 | Win7 Ultimate 32/64 | AMD FX-8320, 16GB, GeForce GT 630 |
01/09/19  
 




Walter
okay, known I do not...
 
01/11/19  
 




p.specht

as Retro-Rip the GIF.INC for XProfan11.2a-Free as GIF11.INC-Snippet:
trouble: The Bildlauft stockt In XProfan 11 regularly for 1/2 second. has someone a idea, How to the liquid can make?
' ---- GIF11.INC snippet ---------
' based on GIF.INC by Walter Kowarik (c) 2019

Proc LoadAnim

    Parameters MP_Pfad$,MP_X%,MP_Y%,MP_B%,MP_H%,MP_Win%,\
    MP_Num%,MP_Rep%,mode%
    Declare MP_MCI$, i%,Pic&,Fak!

    if mode%=0' verzerrt einipassen

    elseif mode%=1' proportional fitting

        Pic&=Create("hSizedPic", -1,MP_Pfad$, MP_B%, MP_H%, 1)
        ' skalieren
        Fak!=MP_H%/%bmpy
        MP_H%=MP_H%/Fak!
        DeleteObject Pic&

    elseif mode%=2' Originalgröße, ev. clipping or überdecken

        Pic&=Create("HPIC", -1,MP_Pfad$)
        MP_B%=%bmpx
        MP_H%=%bmpy
        DeleteObject Pic&

    elseif mode%=3' if <= welt orig. Size, otherwise prop. fitting

        Pic&=Create("HPIC", -1,MP_Pfad$)

        if (MP_H%>=%bmpy) and (MP_B%>=%bmpx)

            MP_B%=%bmpx
            MP_H%=%bmpy

        else

            Fak!=MP_H%/%bmpy
            MP_H%=MP_H%*Fak!
            DeleteObject Pic&

        endif

        DeleteObject Pic&

    endif

    MP_MCI$="OPEN",@Chr$(34);MP_Pfad$;@Chr$(34),"TYPE MPEGVIDEO ALIAS MP_PIC";@Str $(MP_Num%)
    @$ MCISend(MP_MCI$)
    MP_MCI$="WINDOW MP_PIC";@Str $(MP_Num%);" HANDLE",@Str $(MP_Win%)
    @$ MCISend(MP_MCI$)
    MP_MCI$="WINDOW MP_PIC";@Str $(MP_Num%);" STRETCH"
    @$ MCISend(MP_MCI$)
    MP_MCI$="PUT MP_PIC";@Str $(MP_Num%);" DESTINATION AT",@Str $(MP_X%),@Str $(MP_Y%),@Str $(MP_B%),@Str $(MP_H%)
    @$ MCISend(MP_MCI$)

    if MP_Rep%=0' Dauernd repeat

        MP_MCI$="PLAY MP_PIC";@Str $(MP_Num%);" REPEAT"
        @$ MCISend(MP_MCI$)

    else

        MP_MCI$="PLAY MP_PIC";@Str $(MP_Num%); " FROM 0:0:0"

        Whileloop MP_Rep%:i%=&Loop'  Durchlauf sooft here desired

            @$ MCISend(MP_MCI$)
            sleep 2000

        endWhile

    endif

ENDPROC

Proc ClosePic :parameters MP_Num%

    Declare MP_MCI$
    MP_MCI$="CLOSE MP_PIC";@Str $(MP_Num%)
    @$ MCISend(MP_MCI$)

ENDPROC

' --------------- End of gif11.inc
MAIN:
''''''''  $I gif11.inc  ' if gif11.inc as INCLUDE, Please uncommenten
declare way$,Image$,WieOft%,mode%
pfad$=$ GetDir("@")
Bild$=loadfile$("GIF auswählen",way$+"\*.gif")
WieOft%=val(input$("einmal=1, dauernd=0","Wie often?","0"))
cls
print "Modus: the Image\n0=in Rahmengröße (ev. verzerrt) displayed,"
print "\n 1 = unverzerrt into welt eingepasst,"
print "\n 2 = in the ursprünglichen Bildgröße displayed,"
print "\n 3 = one small Image in Bildgröße displayed, ein"
print   "       large unverzerrt into welt eingepasst"
Modus%=val(input$("","Modus","3"))
Cls
ClosePic(1)' angewählte Bildnummer vorsichtshalber close
LoadAnim(Image$,10,10,300,270,%Hwnd,1,WieOft%,mode%)
waitinput
ClosePic(1)
' or MCISend$("CLOSE ALL")
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
07/09/20  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.811 Views

Untitledvor 0 min.
H.Brill10/30/23
Axel Berse03/15/23
Walter11/09/22
RudiB.08/08/21
More...

Themeninformationen

this Topic has 3 subscriber:

Walter (4x)
p.specht (1x)
Manfred Barei (1x)


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