Bon j'ai trouvé voilà ce que j'ai fait si ca peut vous servir...
- image.asp
Code: Select all
Dim Path, File
Set ctrl = server.createobject("GflAx.GflAx")
File = request.querystring("fichier")
on error resume next
const AX_JPEG = 3
const AX_To16Colors = 16
With ctrl
	 .EnableLZW = TRUE
	.LoadBitmap File
		if err.description=>"Unknown format" then 
	response.redirect "erreur.asp?Fichier="&File
	end if
    .ChangeColorDepth AX_To16Colors
	'.EnableLZW 
    newWidth = 120 'Get the height according to the width (keep the ratio)
    newHeight = (newWidth * .Height) / .Width
    
    .Resize newWidth, newHeight 'Resize the pciture
    
    .FontName = "arial"
    .FontSize = 13
    .TextOut .About, 2, 2, RGB(255, 255, 255) 'Write library version on the picture
    
    .Saveformat = AX_JPEG
	response.contenttype = "image/jpeg"
	response.binarywrite .SendBinary
end with
set ctrl=nothing
- erreur.asp
Code: Select all
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
chemin=request.querystring("fichier")
image="D:\users\chrominteractiv\ci.chrom.fr\htdocs\OpenVisio\Pictos\pictos\"&FSO.GetExtensionName(chemin)&".jpg"
If not FSO.FileExists(image) Then 
		icone="D:\Pictos\pictos\inconnu.gif"
else
		icone="D:\users\Pictos\pictos\"&FSO.GetExtensionName(chemin)&".jpg"
		
end if
set Fichier=nothing
Set ctrl = server.createobject("GflAx.GflAx")
File = icone
const AX_JPEG = 3
const AX_To16Colors = 16
With ctrl
	.EnableLZW = TRUE
	.LoadBitmap File
    
    .FontName = "arial"
    .FontSize = 13
    .TextOut .About, 2, 2, RGB(255, 255, 255) 'Write library version on the picture
    
    .Saveformat = AX_JPEG
	response.contenttype = "image/jpeg"
	
	response.binarywrite .SendBinary
end with
set ctrl=nothing
Ds mon repertoire picto il ya des image du type mov.jpg, ai.jpg etc qui reprenne en fait l'extension_du_fichier_non_reconnu.jpg
S'il trouve l'icone associée à l'extension il l'affiche sinon il affiche inconnu.jpg
ca marche 

))
Yann