Bonjour,
J'ai la solution

suite un post sur le forum anglais
Voici le code
Code : Tout sélectionner
#include <ClipBoard.au3>
#include <Constants.au3>
#include <GDIPlus.au3>
#Include <WinAPI.au3>
Global $sImageName = FileOpenDialog("Select an image", "", "Image (*.bmp;*.jpg;*.png;*.gif)")
If @error Then Exit
_GDIPlus_Startup ()
$hImage = _GDIPlus_ImageLoadFromFile($sImageName)
$hBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hBitmap = _WinAPI_CopyImage($hBmp, 0, 0, 0, $LR_COPYDELETEORG + $LR_COPYRETURNORG)
_ClipBoard_Open(0)
_ClipBoard_Empty()
_ClipBoard_SetDataEx($hBitmap, $CF_BITMAP)
_ClipBoard_Close()
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
MsgBox(0, "Copy to Clipboard", "Successfully bitmap copied to clipboard!", 10)
;===============================================================================
;
; Function Name: _WinAPI_CopyImage
; Description:: Copies an image, also makes GDIPlus-HBITMAP to GDI32-BITMAP
; Parameter(s): $hImg -> HBITMAP Object, GDI or GDIPlus
; Requirement(s): WinAPI.au3
; Return Value(s): Succes: Handle to new Bitmap, Error: 0
; Author(s): Prog@ndy
; http://www.autoitscript.com/forum/topic/...images-and-the-clipboard/page_
;===============================================================================
Func _WinAPI_CopyImage($hImg, $uType = 0 ,$x = 0, $y = 0, $flags = 0)
Local $aResult
$aResult = DllCall("User32.dll", "hwnd", "CopyImage", "hwnd", $hImg, "UINT", $uType, "int", $x, "int", $y,"UINT", $flags)
Return $aResult[0]
EndFunc ;==>_WinAPI_CopyIcon