Jump to content
Sign in to follow this  


Recommended Posts


Hi, is there an equivelent to - Response.BinaryWrite BinData for autoit? Im attempting to utilise CxImageATL.dll has some nice image functions.

I can save the thumb to file, I believe its possible to display image without neccasary to save it first.


#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 633, 454, 193, 115,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPCHILDREN )

$objCxImage = ObjCreate("CxImageATL.CxImage")
$widthOrig = $objCxImage.GetWidth()
     $heightOrig = $objCxImage.GetHeight()
;msgbox(0,"",$widthOrig & ", " & $heightOrig)
$fx = $widthOrig/$Width
     $fy = $heightOrig/$Height;subsample factors
; must fit in thumbnail size
     If $fx>$fy Then 
         $f=$fy; Max(fx,fy)
     If $f<1 Then 
     $widthTh = Int($widthOrig/$f)
     $heightTh = Int($heightOrig/$f)
     $widthTh = $Width
     $heightTh = $Height
  msgbox(0,"",$widthTh & ", " & $heightTh)

;$objCxImage.Save("C:\Program Files\AutoIt3\Thumbnails\Purple flower3.jpg", 2)
$BinData = $objCxImage.ImageForASP(2,85)
$Obj1_ctrl = GUICtrlCreateObj($BinData,120, 32,$widthTh,$heightTh);<----

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
Edited by Will66

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.