Je cherche a extraire les images, les icones des fichiers .frx
Fred
-
29 sept. 2001 à 09:57
deleplace
Messages postés40Date d'inscriptionmardi 4 octobre 2005StatutMembreDernière intervention 2 mars 2009
-
12 févr. 2009 à 22:41
Bonjour,
Merci de votre reponse
A voir également:
Je cherche a extraire les images, les icones des fichiers .frx
deleplace
Messages postés40Date d'inscriptionmardi 4 octobre 2005StatutMembreDernière intervention 2 mars 2009 12 févr. 2009 à 22:41
Je ne connais pas la structure les fichiers frx
mais je conais la structure des images qu'elles contiennent
Charger Le fichier dans une Chaine
Open "Fichier.frx" for binary as 1:A$=space(Lof(1):Get 1,,A$:Close1
'extraire les icones 32x32
Strat&=1:J%=1:L&=0
Do
Strat=Instr(Strat+L,A$,Chr(0) & Chr(0) & Chr(1) & Chr(1) & " ")
if I Then
L&=Asc(Mid(A,I+14,1)+256*Asc(Mid(A,I+15,1)
Open J & ".ico" for output as 2:?#2,Mid(A$,Start,L);:close 2
J=J+1
end if
loop while Start
extraire les BMP
Strat&=1:J%=1:L&=0
Do
Start=Instr(Start+L,A$,"BM")
if Start Then
L&=Asc(Mid(A,I+2,1)+256&*Asc(Mid(A,I+3,1)+65536*Asc(Mid(A,I+4,1)
Open J & ".bmp" for output as 2:?#2,Mid(A$,Start,L);:close 2
J=J+1
end if
loop while i
'extraire les JPG
Strat&=1:J%=1:L&=0
Do
I&=Instr(Start+L,A$,Chr(255) & Chr(&HD8))
if I Then
L=Instr(Start,A$,Chr(255) & Chr(&HD9))
IF L Then
L=L+2-Start
Open J & ".jpg" for output as 2:?#2,Mid(A$,Start,L);:close 2
J=J+1
endif
end if
loop while L
extraire les GIF
Strat&=1:J%=1:L&=0
Do
I&=Instr(Start+L,A$,"GIF8")
if I Then
L=Instr(Start,A$,Chr(0) & Chr(&H3B))
IF L Then
L=L+2-Start
Open J & ".gif" for output as 2:?#2,Mid(A$,Start,L);:close 2
J=J+1
endif
end if
loop while L