Jump to content
RichE

Watermarking an image

Recommended Posts

RichE

Hi Guys and Gals,

is there a udf to work with images, specifically watermarking images, either individually or in batch

thanks in advance

RichE


RichE

[font="'Arial Narrow';"]Current projects[/font]

[font="'Arial Narrow';"]are on my site [/font]Sellostring

Share this post


Link to post
Share on other sites
stormbreaker

We have GDI+ that comes with AutoIt.


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites
JLogan3o13

This post provides some info on using GDI+ to make a transparent watermark. I've not used it myself, but it may point you in the right direction.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
UEZ

Try this:

;coded by UEZ
#include <GDIPlus.au3>

_GDIPlus_Startup()
$sIn = StringReplace(@AutoItExe, "autoit3.exe", "Examples\GUI\msoobe.jpg") ;this will not work when script is compiled
$sOut = @ScriptDir & "\Watermarked.jpg"
FileDelete($sOut)

$r = _GDIPlus_WatermarkImage($sIn, $sOut, "Watermarked by UEZ", 50, 50, 2,  "Arial", 64, 0, 100)

_GDIPlus_Shutdown()

If $r Then ShellExecute($sOut)
Exit

;======================================================================================
; Function Name:        _GDIPlus_WatermarkImage
; Description:              adds a text to an image
;
; Parameters:               $sBitmapFile: image file to load
;                                       $sSave: filename for saved image -> if no extension (jpg, bmp, png, gif, tif) is given the default is png image format
;                                       $sText: text string to draw onto the image
;                                       $iX: x position of the text on the image
;                                       $iY: y position of the text on the image
;
;Optional:                  $iPos:  possition text to one of 9 possitions on the image. If set $iX and $iY will be ignored!
;                                                   0: turned off
;                                                   1: upper left,          2: upper mid,           3: upper right
;                                                   4: mid left,                5: center,              6: mid right
;                                                   7: buttom left,         8: buttom mid,      9: buttom right
;                                       $sFontName: font name to use, default is Arial
;                                       $iFontSize: size of the font, default is 16
;                                       $fAngle:  angle of the text -> 0° - 359°
;                                       $iAdjY: adjust y position of the text when $iPos is selected
;                                       $iAdjX: adjust x position of the text when $iPos is selected
;                                       $iFontColor:  color of the text
;                                       $fAlpha:  alpha channel of the text  -> 0.0 (transparent) - 1.0 (opaque)
;                                       $iJPGQuality: JPG save quality -> 0 (worst) - 100 (best)
;
; Requirement(s):       GDIPlus.au3
; Return Value(s):      Success: 1 or the handle of the bitmap (don't forget to dispose it when done!)
;                                       Error:
; Error codes:              1: image file to load not found
;                                       2: unable to create bitmap from loaded image
;                                       3: unable to save watermarked image
;
; Remark:                       don't forget to start _GDIPlus_Startup() / _GDIPlus_Shutdown()
;
; Author(s):                    UEZ
; Version:                      v1.00 Build 2012-10-31 Beta
;=======================================================================================
Func _GDIPlus_WatermarkImage($sBitmapFile, $sSave, $sText, $iX, $iY, $iPos = 0, $sFontName = "Arial", $iFontSize = 16, $fAngle = 0, $iAdjY = 0, $iAdjX = 0, $iFontColor = 0xFFFFFF, $fAlpha = 0.04, $iJPGQuality = 90, $bLineBreak = True)
    If Not FileExists($sBitmapFile) Then Return SetError(1, 0, 0)
    Local $hBitmap = _GDIPlus_BitmapCreateFromFile($sBitmapFile)
    If Not $hBitmap Then Return SetError(2, 0, 0)
    If $fAlpha < 0 Then $fAlpha = 0
    If $fAlpha > 1 Then $fAlpha = 1
    Local $iW = _GDIPlus_ImageGetWidth($hBitmap) , $iH = _GDIPlus_ImageGetHeight($hBitmap)
    Local $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    Local $hBrush = _GDIPlus_BrushCreateSolid(BitShift(Int($fAlpha * 0xFF), -24)  + $iFontColor)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFamily = _GDIPlus_FontFamilyCreate($sFontName)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $iFontSize, 0)
    Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Local $aMeasure = _GDIPlus_GraphicsMeasureString($hCtxt, $sText, $hFont, $tLayout, $hFormat)
    Local $iWTxt = Ceiling(DllStructGetData($aMeasure[0], "width") )
    Local $iHTxt = Ceiling(DllStructGetData($aMeasure[0], "height"))
    If Not $fAngle Then
        _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
        DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)
        If $bLineBreak And $iWTxt > $iW Then
            DllStructSetData($tLayout, "width",  $iW)
            DllStructSetData($tLayout, "height", 0)
            $aMeasure = _GDIPlus_GraphicsMeasureString($hCtxt, $sText, $hFont, $tLayout, $hFormat)
            $iWTxt = Ceiling(DllStructGetData($aMeasure[0], "width") )
            $iHTxt = Ceiling(DllStructGetData($aMeasure[0], "height"))
        EndIf
        If Not Int($iPos) Or Int($iPos) > 9 Then
            DllStructSetData($tLayout, "x", $iX)
            DllStructSetData($tLayout, "y", $iY)
            _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush)
        Else
            DllStructSetData($tLayout, "x",  $iAdjX)
            DllStructSetData($tLayout, "width", $iW)
            Switch $iPos
                Case 1 To 3
                    DllStructSetData($tLayout, "y", $iAdjY)
                    _GDIPlus_StringFormatSetAlign($hFormat, $iPos - 1)
                Case 4 To 6
                    DllStructSetData($tLayout, "y", ($iH - $iHTxt) / 2 + $iAdjY)
                    _GDIPlus_StringFormatSetAlign($hFormat, $iPos - 4)
                Case 7 To 9
                    DllStructSetData($tLayout, "y", $iH - $iHTxt + $iAdjY)
                    _GDIPlus_StringFormatSetAlign($hFormat, $iPos - 7)
            EndSwitch
            _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush)
        EndIf
    Else
        Local $iQ
        $fAngle = Mod($fAngle, 360)
        $iW = Int(DllStructGetData($aMeasure[0], "width") * 2)
        $iH = Int(DllStructGetData($aMeasure[0], "height") * 2)
        If $iW > $iH Then
            $iQ = $iW
        Else
            $iQ = $iH
        EndIf
        Local $hBitmap_Rot = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iQ, "int", $iQ, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0)
        $hBitmap_Rot = $hBitmap_Rot[6]
        Local $hCtxt_Rot = _GDIPlus_ImageGetGraphicsContext($hBitmap_Rot)
        _GDIPlus_GraphicsSetSmoothingMode($hCtxt_Rot, 2)
        DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt_Rot, "int", 4)
        Local $hMatrix = _GDIPlus_MatrixCreate()
        _GDIPlus_MatrixTranslate($hMatrix, $iQ / 2, $iQ / 2)
        _GDIPlus_MatrixRotate($hMatrix, $fAngle, False)
        _GDIPlus_MatrixTranslate($hMatrix, -$iQ / 2, -$iQ / 2)
        _GDIPlus_GraphicsSetTransform($hCtxt_Rot, $hMatrix)
        DllStructSetData($tLayout, "x", $iQ / 2)
        DllStructSetData($tLayout, "y", $iQ / 2)
        _GDIPlus_GraphicsDrawStringEx($hCtxt_Rot, $sText, $hFont, $tLayout, $hFormat, $hBrush)
        _GDIPlus_GraphicsDrawImageRect($hCtxt, $hBitmap_Rot, $iX - $iQ / 2, $iY - $iQ / 2, $iQ, $iQ)
        _GDIPlus_MatrixDispose($hMatrix)
        _GDIPlus_GraphicsDispose($hCtxt_Rot)
        _GDIPlus_BitmapDispose($hBitmap_Rot)
    EndIf
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hCtxt)
    $tLayout = 0
    If $sSave <> "" Then
        Local $bRes
        If StringRight($sSave, 4) = ".jpg" Then
            Local Const $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
            Local $tParams = _GDIPlus_ParamInit(1)
            Local $tData = DllStructCreate("int Quality")
            If $iJPGQuality < 0 Then $iJPGQuality = 0
            If $iJPGQuality > 100 Then $iJPGQuality = 100
            DllStructSetData($tData, "Quality", $iJPGQuality)
            Local $pData = DllStructGetPtr($tData)
            _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
            Local Const $pParams = DllStructGetPtr($tParams)
            $bRes = _GDIPlus_ImageSaveToFileEx($hBitmap, $sSave, $sCLSID, $pParams)
            $tData = 0
            $tParams = 0
        Else
            StringRegExp($sSave, ".*.(gif|png|bmp|tif)", 1)
            If @error Then
                If StringRight($sSave, 1) = "." Then
                    $sSave &= "png"
                Else
                    $sSave &= ".png"
                EndIf
            EndIf
            $bRes = _GDIPlus_ImageSaveToFile($hBitmap, $sSave)
        EndIf
        _GDIPlus_BitmapDispose($hBitmap)
        If Not $bRes Then Return SetError(3, 0, 0)
        Return 1
    EndIf
    Return $hBitmap
EndFunc

Edit1: forgot 2 lines which are added now

Edit2: added some more features

Edit3: the backslashes were gone - added again

Br,

UEZ

Edited by UEZ
  • Like 2

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
stormbreaker

There we have it... The GDI Dude UEZ !!!


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites
UEZ

There we have it... The GDI Dude UEZ !!!

You forgot the + ;)

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
PhoenixXL

misunderstood

I made watermark for the GUI

have a look if anyone is interested

#include <WinAPI.au3>

$hGUI=GUICreate('Hello')
$_Path=@ScriptDir&'TC3.jpg'
If Not FileExists($_Path) Then _FileInstallEx(JpgBin(),$_Path)
CreateWaterMarkGUI($hGUI,$_Path)
GUICtrlCreateEdit('Hello',10,10,100,300)
GUISetState()

While GUIGetMsg()<>-3
Sleep(10)
WEnd


Func CreateWaterMarkGUI($hWnd,$nPic)
Local $Struct=_WinAPI_GetClientRect($hWnd)
Local $_Pos[4]
For $i=0 To 3
$_Pos[$i]=DllStructGetData($Struct,$i+1)
Next
$hMain = GUICreate("", $_Pos[2], $_pos[3], $_pos[0], $_pos[1], 0x80000000, BitOR(0x00000008, 0x00000040,0x00000020),$hWnd)
GUISetBkColor(0xABCDEF) ;Set GUI Colour
GUICtrlCreatePic($nPic,0,0,$_pos[2],$_pos[3])
WinSetTrans($hMain,'',15)
GUISetState(@SW_SHOWNOACTIVATE)
GUISwitch($hWnd)
Return $hMain
EndFunc


; #FUNCTION# ====================================================================================================================
; Name...........: _FileInstallEx
; Description....: Writes the Binary Data into a File
; Syntax.........: _FileInstall($sBinData, $sFile [, $sRecurse = 0])
;                  $sBinData  - The Binary Data to Write to
;                  $sFile    - The File to Write the Binary Data
;    $sRecurse  - Overwrite If exist already [Default 0]
; Return values..:
; Author.........: Phoenix XL
; Modified.......:
; Remarks........:
; Related .......:
; Link...........:
; Example........:
; ===============================================================================================================================
Func _FileInstallEx($sBinData, $sFile, $sRecurse = 0)
If StringInStr(FileGetAttrib($sFile), 'D', 2) Then Return SetError(1, 0, -1)
If FileExists($sFile) Then
If $sRecurse Then
FileSetAttrib($sFile, '-RS', 1)
Else
SetError(2, 0, -1)
EndIf
EndIf
Local $hFile = FileOpen($sFile, 16 + 8 + 2)
FileWrite($hFile, $sBinData)
If @error Then Return SetError(4, 1, @error)
FileClose($hFile)
If @error Then Return SetError(3, 1, @error)
Return 1
EndFunc   ;==>_FileInstall

Func JpgBin()
Local _
$JpgBin = '0xFFD8FFE000104A46494600010101012C012C0000FFDB0043000503040404030504040405050506070C08070707070F0B0B090C110F1212110F111113161C1713141A1511111821181A1D1D1F1F1F13172224221E241C1E1F1EFFDB0043010505050706070E08080E1E1411141E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1EFFC0001108012C01C203011100021101031101FFC4001D000100010501010100000000000000000000050203040607080109FFC4005410000103030105050407050407030A070001020304000511060712213141131422516132427181081523526291A1334372B1D18292C1E116243473A2B2F01753C225263554637483A3B3D3446494B4C3D2F1FFC4001B01010002030101000000000000000000000002030104050607FFC4004111010001030105030A04030606030000000001020311041221314151051361062232718191A1B1D1F04252C1E11433621534728292F1072353A2C2D21624B2FFDA000C03010002110311003F00F6382A4F3CA8798E7F3A0AC104020820F5141F68140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A050282852F8EEA464F5F21F1A0617F7FF4A0AE82828E3BC93BA7AF91A02563'
    $JpgBin &= '212AF093CBC8FC282BA05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05052A504F33CF97AD053852C78B291E439D05600030060507DA050283E1008C1191414E149E5E21E479D07D4A82B91E5CFD282AA05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A050282DEF957B18C7DE3CBE5E741525213C7893D49E74155028140A050281414A9215C791E845053BE53EDE31F7872F9F9505CA05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028141429601DD1C55E4283E04957159CFE11CBFCE82E5028140A05028140A050281416CA4A78B7C3F09E5FE541525409C1E0AF234155028140A050445FB52E9DD3E80BBF5FED56A4AB919B31B641F86F114109FF699A317FEC77393731F7AD96E93353F9B2DA8507DFF00B47D3DD20EAA23CC696B8FFF006283E0DA569549FF005855EA1A7AAE5D8673081F152D9091F9D06759B5D68ABD49116D5AB2C73251FDC333DB53A3FB19DE1F9506C940A05028140A05028140A05028140A05028140A05028312E770816C8AA95729B1A1C74FB4EC8752DA07C4A88141AC9DA768257089A9E15CD5F76D9BD355F93016681FF0068FA748CA61EA958'
    $JpgBin &= 'F34E97B8FF00F6283E1DA469B4FED23EA56879B9A66E2903E24B18141722ED2740BEFA63FF00A61656242CE12C4996961D27CB71C2159F4C506D4CB8DBCD25D6569710A194A927208F4341728140A0507C5109192702828F12BF0A7F53FD282B4A424600A0FB40A05028140A05028140A05028141F1490A1822828F1279F893FA8FEB415A4850C83914115A8AFF65D3B09332F772621B4B5F66DF68AF1BAB3C90DA47896B3D129049E82835A73536ADBD6469BD3E8B5443CAE17D0A0B23EF222208591E8EAD950FBA6830A4E989770F16A4D517CBB13CD86A4983187A0447DC5293E8E2DCF89A0FB6AB0D86C2B52EC961B55B5C57B4E458686D6A3E6A52402A3EA4D18CB5ADA245DA3DD9691A575CC3D3ED0461417674C9754AF3DF5AF0072E0119F53432E437BD9EEDF5E714B6B6D2EB84F40EBD147E4D820567065AE4AD23F49BB61ED226BC9D72239066FAE1CFC9E09158C1946DE757FD22AD110A357595FBEDB9BE2E26E7638F3E363F13884103FBD4657F467D20A3405A112B4E4DB0EE9C76DA5AE4B8ED37F084F7691D47E205077DD9DEDBD17E534C5AAF76AD4CB56077192916ABB7C1295931E42FF00854D2683ABE9CD6364BE4D55B5A79E83754237DCB64F68C794848E6A0857B68CF0DF46F20F451A0D928140A05028140A05028140A050281418D365468311D99324331A3B282B75E796108424732A51E000F334'
    $JpgBin &= '1A72F5DC9BB1DCD17607EF283CAE32966240F8A5C29538E8F2534DAD07EF8A0C57AD1A9EE637B50EAF96DB679C3B2B7DC5AC791732B7C9FC497119FBA2831A3690D2F025098CE9F80ECD1FFE325B7DE657CDE7779C3F35518CAD6B356AB9B6931B4DDFE259E5EF7FB44881DEC04E3925256900F2E27787A50CB8B6A2D0DB7A9AB52D1B6B3F06A29863FF00922865A9CDD07F491884B91769B2676392517D92927E4B481FAD6706580FDDFE94F63614D4B379BAC5C616D18D1AE4950F5484AD58F8D6194558B6DF32CF705B57BD056C85292AFB672C4EBF639455E6E762ADD59F4523141DB367FF00483B7CF536C46D60D874E0770D5D1D31CA8F9227464F6691FEF1A2A3E741DAAD5B41B538F478B7F8F234E49925298FDF548316493EC8664A0969655D12541647B828375A0A0AF2709193D4F4140423077947795E7415D028140A05028140A05028140A05028140A0F8480324E00A0E5BA8B692EDCAE8D59740B02E125FCE2706FB46D69070A5328DE487520F02F29486527805AD7F6642734968B66DB3957CBCB8A9F7E793BAE4B79D2F2D20F1284B842709CFB884B6DF23D9839243667D3E9411F2134451CF20A8E050632E138BF79228CE161CB438BFDF207C8D67261655647FDD79A3F1C8A64C2816EB94658719077872536BE3596103A9B47E8BD5AA2CEB1D2B024485F0EF819EC640F8B88C2FF5C7A5630CE5C7F5FF'
    $JpgBin &= '00D154A12E4BD0B7C2BC71102E4464FA25E48C7C0293F155619695075EEBCD012D9D29B4BB148BCDB58585B516E6A5090C63807624A49DE491D1495103924A79D07A47665B4B372B477FB1DC25EAEB23407798AEA00BD5B07E240E12903A11F6870705E5720EBB64BB5BAF96D66E96998CCC84F025B79A5641C12083E44104107882082011412140A05028140A05028140A050689AFB68D6DD36E396F86DA6E578494214C2564371D4BFD9879694A8852BDD69095BABF710A19202334FE8FBBEA394CDF35F3CA94B4283B1603A809698239292C02A436474528BAE8E0438DE4B603A03ADA509DD48C0A0C0909E74451D213924506239156BEA91F134670B0E5A9C5FEF503E46A46160D8DEF75F6CFC41158C985B5D9E6A38A3B3591F75583FAE29930C1BE5AEDD788C216ADD3F0EF1140C0EF9192E291FC2A2381F5073EB5961CBB5AFD18748DE5854ED197293637D637931DE2644627CB89DF471EBBCAC79545272E6A0ED73626F3B1AE296D5A71D250F32F8EF96B9693CD3B87D92AF23B8A3D7850764D8E6D52DF7A4B703474945BE6A78AB4B5D64A8C77C0E7DCA41C96B97068828006021232BA0EEFA4F53DBB50A5F663A5F877089BA265BA5A03726293CB7920905270775692A42B04A544506C140A05028140A05028140A05028140A05028312E73A1DB2DF22E17194CC48719B53AFBEEAC250DA123254A2780005079C'
    $JpgBin &= 'B6C7B49BAEA1BF5B343D8E0976E17B5845BAC7202905D6CE4997711ED2180905423702A4A4977865AA0EDBB3AD1B0B47D9D4C3721DB85D2514B972B9BE076D31D03009C704A123821B1E1427000F30DA57BBB877B18C71CF2A084993DB4AFB38C0BA738F4F979D069BABB5DE9BD3ADBAE5E6F0DA5C6BDB8EC8ED1C47A2923823FB653F1ACC44CEE86266237CB93DCFE9171254D55BF47E9A917695EE270B7D6AFF00E13231FF00CCAB62C57CF72A9D451C2378DEA8FA455F3ED2D3A1A6406CF47A146898FF00F54B59A7774C71A98EF6B9E14AE772FA4EAFC4AB7389F4173B60FF00F848A6C5BFCDF036EEFE5F8A954FFA4A5AFED2658273ECA7890DB36E984FC9A2DACD3BBA27854CF795F3A5651B77D51617D0C6B2D26CC4528EEA112E3C9B53ABF5CBA1C68FF7D22B1DCD5CB79DFD3F8B737ED3BB64D11766D913E4BD6353CADD695724A446755D4224A0A9957CD43E155CC4C715B15455C1D15B5A56DA1D4292B42D21485A4E52A0791047023D6B0CA3B5469EB1EA8B4B96AD416C8D7186BE3D9BC9CEE9FBC9238A55F89241F5A0F34EBCD8C6ACD9B5E06B2D98DC26C98F18959651E2951D3D4118C3CDF98C671CD2402AA0DFF63BB426F5B2DEBC69C544B3EB56D01CBADA9C594C2BC20003B4EA52BE403A015A3805871012283BA692D470B51C071F8E87A34A8CE76336148012FC478004B6E0048CE08214094A924292'
    $JpgBin &= '4A48242728140A05028140A05028389EDCB6BF034E58A7390EE0B89023B8A8D22E2C1497A44819062C30A052A701042DE20A1AC11852C1080CED81E84950EDB17586AC84962FD290A761DB86F29BB3B4EF1290544A9721638BAF2C97144EE9381C43AF50465C66C760946F6FAFEEA7A7C4D06ADA9352DB2CCC87EF5738D6F42C65B42D5E3707E140CAD5F2068397EA4DBBD820BFDDAD56E7E6BE4EEA4C8743393D30DA02DC3F309AC4D510BE8D35DAF7C528F46B5DB45FC66C5A2A54442BD873EA82DA48F3DF92E60FC776B1B5D213FE1A29F4AB88F8ABEE5F49090779519E64F90956C47E81B34CD5D0EEAC7FD4F84A85B1F493860A84490F2473FB4B63DFA6E24FE46999E877366785CF84B15FDA96D534D78B53E8F1DD91FB47E55A64451F275A53ADFF00C34DAEA7F09357A1544FB5B3692DBBE98BBE1173B7CFB51C656F3644D8C81E6A5B5E340FE26D22B31313C14DCB35DBF4E30E9B66BA5B2F16F4CFB2CF873E128E13222BA971BCF51949C67D0FE55956C97D8624C7763C965B7D975250EB6EA42D2B49E6140F023D283CFDB5AFA3A4396A72F9B3C5A6DB3D07B436E539BACAD438E5A5FEE959E409DDE58DC02823B661B469373BC46D1BB477A658B575B9658B55F8A43725A59C7D8BDBC30A0AE1C140A1CF0EF0DEDD590F46E93D512645C0E9DD46CB30AFEDB65C4765911EE0D0C02F304F1E191BED9254D9233B'
    $JpgBin &= 'C9285AC36FA05028140A05028140A05028140A0505A79D6DA6D4EBAB4A108054A528E00039927A0A0E05B68DA23317474BD793DB0BB1C0524E9EB739902E5289FB294E8EA8046FB68E894974F8BB3DC0F2DFD1BB6B10F4A6D92E1AE75AC7B85EA4DCA2BCD2DF64214F36EAD6856F80A2918C24A7008C0381C385473BD38A730F72686DA1BBAF62BAFE9CB3BD11848052FDC48E04F428413D0FDEA4559E0CD546CF1486A8B8FD436E0BBA4A993D612A716A6D918E1C790C2523A0C9CFA9E26B3BD18889DEF3C5DF5BED27697759365D9F40540B6A145A913DD5969947985398DE51E3ECA47C52471ABE8B511BEB9F635ABBD356EB71ED6D3A1B607A6ADAB44FD5F7499AA2E1CCB6B5166220FE1692727FB4707EE8A9CDDC6EA630845A899CD73975FB2B36BB1C14C1B45BA15B62A79351184B48FEEA401F3AAA733C5746237433FBFF00E2FD6B18672F9F587E2A60C9F587E2A60CA89129A90C2E3C8436F32E0C2DB71214950F220F034C319733D55B1CD0B765BD2ACF19DD2F7075385BF6821A6DC1F75C60E5A5A73CC6E8CF9D59172AE13BD5CDBA78C6E72F916EDA36C79D5CB89250E5912A2B72542614EDBC8EA64C2C9547CF57639C240C6E926B336E9AFD1DD3D188B95D1E96F8EAEB7B35DA9D9B56AE35BE52116BBCC8415B11CBE1D626A4735467870740EA8E0B49C829E04D513134CE25B14D5154661D041F2AC32E3F'
    $JpgBin &= 'B57D90AA75D93ADB67EF26CDAAE2B9DBEEB6421A96B1CF3D12B3C4127C2AC90AE6554137A3EF33B565ADAD5B688A9B4EB5B5660DD2DEFE5B43E51E2545781E210ADEDF6DCE25B2ACF105C4AC3AA695BF42D45676EE5052F201529B798793BAEC77527756D389F756950208E5C3209041212F40A05028140A050738D7DA89570933AC16F9EB816D8092ABFDD1B70A0B29DDDF319A58F65C28214B58E2DA08C616B4A921E06D57B4D6752ED86CDA8E45B42F4C58E7309B6D990021B44369C49ECC27D90A584F1F881C80C46A94E88CBDDBB38DB4D9B68129A634E592EC02BF68B981B6C207F614BCFE948AB32CCDB988CCB7ABAADE8909F992A5294940C86DA1BA3E0327893EA71F0E344237B866BEDA25F245E069AD196F7DFB8AB988E52B753E64AB8A1A48FBC72797B3519AF7B6EDE966A8DAAA711D7E8C6D35B17977490ABA6D0AFEFBEF3C779C8301D500AF475F5656BF50303C8D67133C52EF28B5FCAA77F5975BD2BA7B4BE956035A76C502DBC3056CB43B450FC4B3E257CC9ACC44428B95D773D29CA73BF7AFEB59CA1B277EF5A64D93BF7AD326C867EE9C0277BC81FE74CB1B2D3B56E81D17A9D2B5DCACAC352947784B85FEAEF857DEDF46378FF167E15198895F45EB9470971CD43B27D65A2AE2E6A0D0579973C8E2AEC54199FBA38E1631D9CA1D485A727901D69BE1662CDEE31B33E1C13DB39DBA4692B16BD72D'
    $JpgBin &= 'B56E9085F646E486CB4C85E71BB21A2498EACE06F64B79246538C54A2A896BDEB15DA9F3B875E4EDA950524292414A8020839041E2083D45654B47DAD6CC74FED12D9B9390225D1A414C5B836805C6FF000A87BE8CFBA7CCE08268357D9DBB7996DAF665B442FC7D436A025D9AEEC2FC6FB68F0A5F65C238B88DEC1C8F125452B491BE0875CD11A8654E72458AFA9699D41012953E1B494B52D924844968124EE2B0414E49428149246EA941B5D028140A05028140A05028140A050739D7B346A3BC2F49B4ADEB544DD5DEC8E5214405370FE0410B707DC2841C874E03867D31B47EB6D6B67D3B0B4ADB1DB930CCA79D98D21D4248594A436A3BC464005D19E99E3CE834ED8EFD17AE6998C5D35ECE661B482142DB0D61D717E8E39C5291E89DECF9A6A331994E2AC461EA63A8B4EE84B5478298F160416DBC86DBDD404F40027AA89F3F251CF0ACD31BF10C553BB3328AD4888FAF61C7917343ACDA7DA4C5DEC29FF2512388491F3F80209B623655D5398C2FC47224088D42811D98B1594EEB4CB28094207900380ACEF957988DD0B9DFCFDEA60C9DFCFDEA60C82791C95C3A8E94C197D13B7BD93C7CBAFF009D0CBE77F3F7A983277F3F7A983277F3F7A983277F3F7A9832E41B46D9930B126EDA3A2B0DB8EAC3F2ECAA5F651A52C7271923FD9E40F7569C0E878156F5B1315462B5534CD33B5426F635B5754A5C7D3FAA65'
    $JpgBin &= 'BCE29C7FBA43B94A4F66F26471FF00539A9F71FE0775CF65D03A2C285515D1344EF5F6EE4570ED79E86A0B1436CB0890E49430D25E74252E3A100296139DD04F32064E33CB27CE8206ECEAB4A5F15ABE3929B63E12DDFDA03806D23751300FBCD0C059EAD7139EC90283A3A541490A49041190475A0FB40A05028141AA6D0AFD2AD9123DAACEB40BDDD0A9B88A5277931D09C76B2569EA96C28607BCB5368E1BD901CAF6BDA72E8EEC46FBA6746C771E9EF44EC9A42DD1DA3FBEE053E54B56379C5A4BA544FB4A51EA683CCDB38FA326BCBC4D43BA90C7D370010545C525E90B1F8508240FED2863C8D62632953561EC2D0D66D3FB31D2C225AC2C3680029F94F6F38F2BF12BA0E670900000E0563833E9710EAD5EB58CFC2B6AFB08293BAECD48E1BDD508F338EBD387CE3B5B5C1B54D98B58AABE3D172C96FB4D822AA35AA32190B3BCEB9CDC755F796AE64FE83A6291111C18AEBAAB9CD4CEEFBF8AA5943077DFC54C983BEFAD3261F7BE70C956079D32C61F0CEE89240F3EBFE54C987C1340E4699670FBDF7D6993077DF5A64C347DA5683B2EB2419808B7DED08296A7B4804A8631B8EA7938823860F4E1CB20C6632BADDD9A236677C74737D9F6BABFECB2F674AEA98CEB9666FC4A8E825C315BE3FEB110F35B3CCA99E69C1527185A4669AB3BA55DFD3C531DE5BDF4FC9E9681322CF84C4E8325A9516436975979A56F'
    $JpgBin &= '21C41190A49EA08A9B5171C61875D65D75869C71851534B520153648292527A12091C3A122822F53DB254D6E35CACEE34C5F2DAB53D6F75C384289002D8708E3D938004AB9E084AC0DE4268367D2B7A8BA82C51EE9110EB21DDE4BAC3A9C391DD4A8A5C6963A2D0B0A49F5079D04BD028140A05028140A0502814105AD6F6AD3FA79F9CCB2244D5A92C418EA5603D21C212DA09E89DE20A8FBA90A3C85069963802D96D6E217D525EDE53B224A861521E5A8A9C748E854A24E3900401C00A0CF06822B58EA1B7E95D3332FB73792DB11D07701F7D78E03FAFC80E24566299AA710C4D514C665C1740B575D7DA817AEF55973EADED09B64073D9731FBC58E440E83AE3EE800ED4D116E36638B53BC9BB3B5570E4EBCE5D14BE6B26ABD959B6B467E7AD6708ED1DFBD6B383277EF5A60C9DFBD6983277EF5A60CAA1700AE0B3FDA1CFF00CEB1836854C5019C8293C88ACE0CA9EFDEB4C19436A1D6768B0CDB643B94B4B4F5CE488F1D24F356399F219C0CF99155D7722898895372FC513113FED1D6533DFBD6ACC2ECB9FED3B4C26E45EBFDA213522E259EC67C151DD6EEB1C60F64BC727060143838A5413E43128C4C6CD5C109CC4ED53C5BB6C136802F90D9D3B739EECC9498E5FB54E7C61D9D19070B43BFFE6593E1707BC30B1904A8EB574CD33896D515C5719875E8ED878290938779A47457A7C6A29ADA82549285A42924'
    $JpgBin &= '614950C823A822823F66EFAAD6F4BD1721448B6A12F5AD6A392E41592108C9E65A505347AEE869478AE8377A0502814169F71B61A5BCF2D2DB68495296A3809038924F4141CB6CD21CBCCD95AB24A54972E61221A163058849C96538E857BC5D575CB8127F66282581A0296DB6DADD79C4B6D3692B716AE4948E67FEB9F2A0E13A8EEF3F695AD5EB4407DE8BA7E02B12DE49E38CFEC92796FAB1C4FA750003555BE710E969E88B54F79546FE51FABA55B9C8D6E80CC182D263C6613BADB68E491FF5D799359C21566A9CCAE99BEB59630F9DF78E37A86CBEA66151C0249A185466253EF6F2BE3C07F5A31852671272559A1B277DFC546764EFBF8A86C9DF7F150C1DF7F150D93BEFE2A1B2D7B5DD86DFAB6D1DCE5A8B32593DA43968FDA4773A29279E380C8EBE840231319596EB9B739693B16D6D3741EA67746EA7298F6A76404AB8E1B82FACF85E47DD8EE920287B285A82BC2145352A6ACEE951A9B11479F47A33F0F07A69A08ED771E2A40E44FDD3EB526A3EBC8534E16D6388F2E46820623DFE8E6B86E40F0DAF50B896640F7599E9461A73D03A84F664FDE6DA038ACD0742A05028140A05028140A0502839C6AA95F5B6BAEC01CC4B035803A198F2389F8B6C280F5128F950540D056DA4AD694271951C0A0F376D7AF0ADA56D3D1A4A23CBFF0046EC642E7290480EAF3ECFC49F98E3F7056DD9A7629DB9E32D2BF5ED'
    $JpgBin &= 'D5B11C238B72664B6C328619421A69B4842108184A52060003A014C31955DFB80E34C193BF7AD3064EFDEB4C193BF7AD3064EFDEB4C193BF7AD3064EFDEB4C19548B82907215F11D0D30656AE178870E0BD364BC98ED3282B70A8F0C0F23FE150AEA8A23328D75C531964ECC3654DEB7D3777D57AFA1B8D4BD450CC6B5C658F1DAE193BCDB89CF2794A09733D0048E1950AD58899DF57195F62C6CD3335EF9AB8FD3D5082D3572B9B2DCAB1DFF0009BE599F30AE00725A920143A9FC2E20A560F92AAFB356636678C35E9CD1336E797CB97D3D7097EFDEB57613CB44BF469166D52C5CECF2130BBFCC43D1DE3C130AE83834E9E81B787D8BA0F03BC952B380295D3B74F8C33455B15784BD2DA175247D53A5A05FE236A8E5F410F4757B719F412971A5678E52B0471E6003D6B51BAD8E490E25125231BFC163C9439FE7CE835AD5EE9B5981AADBC85595D2E4AC7BD09CC26483E89484BD8EA5848A0E8A082320E41A0FB40A050691B569224C085A5D273F5CB8A4CB03FF00526C053E0FA2F2864F976F9E941825454A2A3C4939341F41A0E67B7BD4D2A14089A4ECCACDD6E8B09383EC0E793E4120851F520FBB51AA710D9D2D98B95E6AE11C51FA56DF134ED8D8B5C3E296C6F38E11C5D59F6967D4FE8303A54237372BAA6BAB3295133D6A48618B75BDB16D84A9520AC804210DB692A5BAB2709421238A944F00055755714C'
    $JpgBin &= '65758D3D57AAD989C446F999E111CE67EF333BA333310D8ED1B29BC5CAC8AD4177B8BB6ED5AE90E42610E15C782D7FEAEE241C39BFFBC574206EFB3E28F73331B533E77CBC3D5D7AFBB139ED6A68ABBAB74E6CF389E357F54F4ABF2E3D1E1BFCEDA8062EB23BCCAB64D8AE5BAE50D7D9CC88E1CA90AE873EF21438A543811F3A9535E774F1862FE9A28A62E513B5455C27E713D2A8E71ED8CC4C4AF77CF5AB1AF83BE7AD0C1DF3D6860EF9EB430C369DBCEA1BE274C696083715242E5CB5A7799B7327F78BF359E3BA8E6A3E401354CD5354EC53ED9E9FBFDFAF728B76F4F6E351A88CC4FA34FE6F19E94C739E333BA39CD337AC343BFB3BB6B775B3C89D71B0A503EB5121C2EBD1DCF7A583D50A3C5C48E09F680C6F6134773BE9E1CFEBF5F7F1E2B3ACFED39EEF5131173F0D5BA23FC13CA23F2CF0A7D19F371B31E89C95A12B42D2A4A8652A07208F315644E6330D5AEDD545534D51898E2FBDF3D6A48E1A5ED52C69BD5AC5CA2B0876E1090AF011C243241DF68E389C8271D739C609CD467AC2DB78989A2AE12E89F474D687526923689B256FDC6D084252EB872B9311590CB87CD49DD536BC7BC8CE7C55644E632E5DCB736EB9A6793AD0576F1083FB464647AA3FCAB2822750DB1BBD5925DADC794C17D186DF4FB4C3808536EA7F121612B1EA914135A22F2E5FB4C42B8C9692C4C214CCC652721992DA8B6F207984B8'
    $JpgBin &= '95807A819A09DA05028140A05028140A0B329F66346764BEE25B65A415B8B5724A40C927E541CA74C179DB3B73E520A255C94AB8484ABDA42DE3DA041F5425496FE0D8A09406835ADAC6A7468FD9BDE2FA48ED832588E93EF38BE1F97100FA2B353B746DD51085CAF6299A9C1367705766D3C83254A5CF9AB32A638AF694E2B8E0FC07EB9F3ADDAE733B9CFA2311BDB1F7D3E7504DF7BE9C73A60CBE77D3E740EF87CE81DF4F9D03BE1F3A077C3E740EF87CE81DF4F9D3032766FA5D7B53D705A9692AD21A7DF4AA7E47827CC18288DEA847052FFB29F7B234ABAFBCAB3CA387D7E869E8EF6AEF678470FAFE91EF7AA12D94FB18C7DD3CBE5E54741C47E921A6D56D99136916F69494329440BEA00F6A3957D93E7CCB6B5609FB8B3D1158DAD898A9A9A9B7988B91C63E5CFEBEC73CEFA7CEB7A37EF8531313BE18B77447BADAE4DBA60DE624365B58EA33D47A83C47A8ACC6E277EE6D7F473D47211A824D9EE0EE5CBBA1C75CE3C3EB28A1299047ABCC965F27CF7AB52E462A986D58AF6A9C4F1877E8CADE438C9F78653FC438FF51F3A82F5875B69E656CBEDA5D65C49438850C85A48C107D08E1415ECBA43CBD20C5BE4BAA7655A5C72DAF2D672A5F62A28438AF55B61B73FB741B55028141CCAE523EB1D73799C4E5B841BB5C7F21BA90EBCA1FC4A75083EB1C505D0682A4B8DB495BEE8CB6CA0B8B1E6074F99C0F9D079'
    $JpgBin &= 'E2DB3D7A8B5A5DF57CA5F680BAA8B089E5B809DF58FE2567F51554CE65D6B747776A29E73BE5B0F7CF5A3385B9173622B0E4892FA1965B4EF2D6B5600158AAA8A6332B2D59AAED514511BFEF33EA8E333CA1D37647B3F7CCC6358EA78EB4CD4826D705D4FF00B1A08FDAA927F7CA1E7EC0E1C0934B744E76EBE3F2FBE6D6D6EB299A3F87B1E8739FCD3D7D51F863DB3BE777624A4247015739AD136A5A09AD5711B9D01C6E0EA1869221CB29F0B89E659740E2A6D47E693E21D41AAE51B7BE374C7DFB9BBA2D6CE9A669AA36A8ABD28EBE31D2A8E53EC9CC4CC4F0B4CC92D4A9102E115D837188BECA5C477DA6978CF3E4524710A1C140822A14579DD3BA61D2BFA78A222E5B9DAA2AE13F389E931CE3DB1989899B9DF3D6A6D7C1DF3D6861F2D8D5E7535F51A6F4CA12A9EA485C994E2779980D1FDE2FCC9E3BA8E6A3E401355CCCD53B34FB67A7EFFEFEBDAA68B5A7B71A8BF1989F469FCDEBE94C739E333E6C6FCCD3E87D05A4AD3A2EC08B55AD0B254A2EC992E9CBD29D3ED38E2BA93F901803000AD8A288A2310E1EA3517353726E5C9CCCFDC4447288E1111BA21B229295A4A5490A4918208C822B2A9E74DA669177404D370B736A3A5253B8DD1C7EAC7547820F932A27C27DC2777914D6AD51DCCE7F0FCBF6F93D169AEFF695316AAFE74709FCF11CA7FAA397E68DDC623301DF3D7F5AB5A9B277CF5A1869FA62E89D'
    $JpgBin &= '05B5889724A8356B79CFB7E89115F5250F27D7B373B3740E8127CEB344EFC29D651B5445CE71BA7F47AD195962402A1EC92143D39115639C3A9ECDD52339093807CE8303462FB86B3BE5A49C3339B6AEB1C74DF23B17D23D016DA59F578F9D06EF40A05028140A05028141AA6D597BDA1A6C1271F59AD9B6A88E61321D432B23E095A8FCA8219A6CBEDC992AF0A5B1BC71F7947007F33F2A0B20D079E3E9B37D537174F6976D7C141535F4E7AE308F910AFF0082B73494EF9A9A5ADAF1114B47D05A80DCB4FB4975799318069DC9E2703C2AF98FD41ABAAA712D6A2ACC360EF9EB51C2593BE7AD3064EF66865F44A3E7432FBDE8F9D32C6D1DE4F9D632C6D3EF793E74C9B4F9DE4F9D32CED2D34CDE750DF20692D378379BAA8A1B708CA62323F69217F85039799C01C7856B5FB99F323DBF7E28C5337AAEEE3873F574F6FC9EC2D01A4ED3A2F495BF4D591A5221C26F742D7C56EACF15B8B3D54A512A27CCF0E18154BAD11111886C01346566E10225C6DF26DF3A3A244494D2D97DA58CA5C42814A927D08245078D753D9A668BD513B494E716E18242A1BCBE72222B3D939EA40050AFC483E756E9ABE36E7970F53953477554D1CB97DF821EE7786ADF6F7E6BE7ECD9415119E27C80F52703E75B9119666710D63635AB24C3D4132E725C2A7614D62F631CD49439D9486C790532FAF3E8D8F2AD7D653B334CF5DDFAC7EAC6'
    $JpgBin &= '9EE6CDE889FC5BBDBC63E197BB52AEC9ECA4856E2B811C8E0D6B3AAFAE00971491C8138F85062E8C5F75D6DA8600186E5B112E43D5C2171D78F8263B27FB541BAD028295A928415A880948C927A0A0E4FA21B72E168B7BC7C2E5CB7A7AF3EE190B548503FC3DA11F04D04828A778EE67773C33CF141AA6D96F2AB16CBAED31B5943CF80C3441E39381FA29483F2AC55388CADB14779722979BB66379EC83B687578049758CF9FBC9FF001FCEA889776F519DEDEBBD7AD4B2A30AA34DEEF718370436C3AF4192892C25F6FB46FB44F2DE4F51FA8E04104021BB3992ADAD8AA889C6774FCFE70F4FECF3595B759DA4CA87F612D8C265C352B2B6147971F7907077558E383C88205B13971EBA2689C4B6BACA05073DDAD6CF1AD6111370B7B8D43D4311B298B2549F03C8E7D83D8E2504E7079A09C8CF882A9B96F6B7C6E98FBF737B43AE9D34CD15C6D515718FD63A551CA7D939899879D5C7E4C797220CF8CEC29D15CECA4C677016D2FC8F4208C104702082320D428AF3BA774C3A97AC451115D13B5455C27AFAFA4C738E5E31313393608179D537E6F4F69C6D2B98B485C890E0CB509A3C3B473CCFDD4F351F4048C4CD554ECD3ED9E9FBFDFAE514DBD35B8D45F8CC4FA34FE69FD298E73CF846FCCD3E9BD01A3ED5A274FA2D56B4A9654AED24C9778BB29D3ED38B57527CB9018030056CDBA2288C4381AAD4DCD4DC9BB767'
    $JpgBin &= '333F71111CA2384447086D1595450737DB16BAB5D86D4FD8D2C46B8DC26B25B5C579216D36DA860A9D1D4119C27DEF419351AA71B9B1A7B335CE78447DEE79DA2B8DC68CD4768ABB3690109DE564E00C71279D554C45318875EEDCAEF57372B9CCCF15DEF5EB59CABC398EA3BD3773D541C7179828CC624756940A5C23E214AC7CAA3B5BF2BEAB3B56A68EAF626CA2F0F5F367162B84A5132FBA88F2893925E65459709F52A6C9F9D6C3CEB6C755BC10AEA5201F970FE405044CC5989AC74C5C53C37E4BD6E74F936F32A73FFA91D91F3A0E8140A05028140A05028141A56D4179734E47CF072E6B5AC79844490A1F92F72831DDC33A7981EF487D4B27D123771F993411E324E073341E3CFA5D5C4CDDB6DCA36F6516F61A8A8F418DF1FF003D7474B18B7972F57566E63A39BE99BB3967B9A5F049657E07923AA7CFE239FF00FED5F54661AF4CE25D39A98975A4B8DAC290A190A0781079552B3697048F535199626A56247AD6328CD6A848F5A8E51DB54241F334CB1B67783E758CB1B676EAF3A64DB599B7266143765C852834D27270324F9003A927000F3350B97362324D733BA37CCF07A7BE8D7B3791A4AC2F6A3D42C246A8BD212B9083C4C28E38B71479639AFCD5E7BA0D6AC4638F17634F662CD188E3CFD6EC013595EAC2683E9C00492001CC9A0F217D2275CD97586B0882CEC34E47B421C61BB8249DE925646F01'
    $JpgBin &= '8E6D8291BB9E672470209D8B16B33B72E7DFBB15CE2393CF9AF2F866BE2DCC2F2C32ACB841F697E5F01FCFE15BD4538DED5AEACEE5BD98AB3AD21C53ECCE43D0543FDF34B687EAB07E55ADDA1FC899E9313F18CFC32AAAAB6366AE931EECC67E197BE76757055D367DA72E0B254B7ED5194E13D57D92428FF781AD277DB0BA72A07CD29FE42830209ECB6916770704BF6C9CCABD48722A91F900E7E66837CA0506BDB4A90E44D9E6A392CAB75E6ED724B67F1F64ADDFD7141076865B86C5C14D001B8AC165AC7BB93BA9C7CA823C1A0E45F4B39A59D1B63B7A4E3BCC92EA87984EF83FF83F2A85CE0DFECEA73773D21E6F8CF3B1A436FB2B2871B50524F911543B5319749B4DDD13E122423C248C293F754398A9E5AD5518964F7A3E759630CFD3DA92E7A7EF2C5E2D127B096CE4024652B49C6F21633E241C0C8F4041040211330AAED9A6E4625EA9D99EB9B5EB8B3F7A884479AC00999094ACAD951E441F7907070AC71E20E08205B139722E5BAADD5B35370ACA050736DAF6CD236B58CDCFB73EDDB6FF001D3B8D4C2DEF21C6F3C5B75231BC064949E693CB8150355CB5B7BE2713D5BDA1ED1AB4B9A6AA62AA278D339C66384EEDF131D638C66384B60D9D68DB4689B022D36B42DC5295DA4A94E805D92E91C56B3FC8720300559451144621AFA9D4DCD55C9BB727333EE88E5111CA2394726D3595250730DB26D3E36918'
    $JpgBin &= 'EAB4DAD4DC8BE388CE0F8911524705AFCD5D427E6786331AAAC3674FA79BB399E0F354AB9489529D952A438FC879656EBAE2B2A5A8F324D56EAC53111885BEF7EB467083D5D7B31A1188C2F0FBE3048F711D4FC4F2FCEA3329DBA3339688470C545B0F5BFD17E7AA4E85B8475AB796CDC7B6F807D865CFF9FB4AD98DF0F357E9D9B95478BADE72CA7D147F503FA5655217582B72CECC91C0C6B8C07F3E4944B64ABFE10A1F3A0E8F40A05028140A05028141CCB6E176365559EE2A6FB54C70F38A4E7982A65B38F5C38AC505E766C79D61B3C988E0763BB18BA850EA14A3FD2831D2F2185A1D708090B4F3F52001F9D07883E90EB53DB6BD4EA573EF491F93481FE15D3B1BADC391AA9FF992D150DD59353526A6C7A66EAA883BA3EAFB03C50A3EE1FE954D52C45CC36B0F655C0E73CB155CD4CCD69BD39A5B586AA8F723A42CA2E4EDB5A539216EAB71A0A037BB049F7DE50E491CB232464634EBBD55CDD44E23AA562C5CD56FA6714F5EBEAF042C29CDCC8C890D6FA50A25250B18536B1C14850E8A0781AB6DDDDA8DFC54D75554553457BA617C3BEB53CA3B6FA1EF5AC6D31B6CBB7BA0092E6E85AD11DC5A0286464272387C6B1356213A2A8CEF74DFA2CE921AEAFAE6ADBDC468DA6C7292AB6A43784C9969CE5DF54364787F1F1F748AD7CED4ED4BADA4D3E3FE6D51BF97ABF77AD826B2E83E8141F7141E65FA4AED7049'
    $JpgBin &= '5C9D11A6657D82496AE929B57ED0F22C24FDDE8B3D7D9E5BD99DAA36E733C3E6E6EAB55133B14FB5E63BEDD94D8EE71978797E152C7B80FF008D6FD2D19B9C91B6EEE51AFBF56478BDA2D3DA25D7DDE2729493E11D388E752DBCAE888851B384156D0B4FA42B708B9C739C79389354768FF74BBFE19F94B5355FDDEBF54FC9ED7D83DE512F44DA6D91D9DC8F1A1BC12A59CAD5BB214919E8381E55A73C5E9A78BA1C879B658ED9E710DB686CA96B5A804A40272493C85618695A5757C5D4DB4AB7B36D4E624290A690F1C82EEFC7905471D1396938EBD7D00767A0506B3B4E1BDA1AE4D9E4E06DB3F0538949FD0D0699A1B51C7D43A3A74B6B0891DBB4DC86BEE2B89E1E8798FF002A0C90683857D2DA4A5F46952D9CB65A92411C8E0B633FCEABB9C1D3ECC8F3AA7118C62C782ECE94D2DFDC5A5086927009209E27CB855510E9D754C7049B37779A876D981B4210E87038DB6309C059031EA056677234C6D426DA9A879A4BADAF79247034CB1B32B81F27AD6329D36A6527A6B50DD34E5EA3DE2CD2CC698C1F0AB194AD279A163DE41C0C8F40460804622E6259B9A3A6F53B32F5CECAF6816BD7965EF11B11AE2C00264252B2A689F7927DE41E8AF91C10456C53545519879FD469EBB15ECD70DD6A4A0A0D335C5D67C0BAB4CC492B690A602880073DE571FD28373A0E4DB6CDAB31A49B72C96471B7EFCE27C6AC05221A48'
    $JpgBin &= 'E0A50E456471093E84F0C05575DC8A777374345A0AF533B53E8BCBD2E6BF2A4BB264BEE3CFBAB2B71C71454A5A89C9249E2493D6B5F69DEFE1E298C446E592F63AD4A2A5555961DCAE8886C951F12CFB09F33FD2A5957DDCB5190F3921F5BCF28A96B3926A2B2230B7465E9BFA24B84D9EFC927A42501FD97D3FC922B628F45E7B59FCFABEF93B9A4FD92BF887F23526B39D6D235A414995A660A91224AA34854958394B250CAD6123CD5948CF97C790775A05028140A05028140A0E3DF4A34A93A4A2BE07571ACFF75CFE4D1A0E58EEBBB969BD33A3253094C884FDB1D6DD8EB380A53729D49293EEAB18E3F0C83C2831750ED5CDD97022C384A84C26534F4852DC0A52C21614123006064039EB81CBA871FF00A4AC23136E7A9DA23817DB58F5CB2D9ADFB357990E26B2717661CFD0DFA54A6A68CD4CA8ECA9C712DA1254A51C04819249AAAAAE22332AEAAF0EDDB06D91DEF5C144A90F3D074F34BDD7A72478DE23829A8C4F03C4614EF14A4E427241AD1AEB9BBFE1F9B7B49A2AAF79F73753D3AFECF64E9AB0DA74E5963596C7019816F8A8DD65868600EA493CC92724A8E4924924935277A2222310F36FD29F65CAB1CF97B4CD37114AB7C85056A286CA73B87A4D427D3F7807F17DE223544C4ED53C5A3AFD277D4ED51E947C7C1C6243906DAD215316A7DD75016869A3C374F1049F5E156457154661C1A633C58A8BDC'
    $JpgBin &= '152B0E5B54139E6974E69B496CD2DAF43E9A91ACAE62D5675BED352E0C8766BC471891523754BCF2DE51F0247992790C8AEA9DA9C726DE8B4BDEDCDA9F463EF0F4FE809103485905A6D96F088ED36DB51DA41C25094823E24F1F89E7527A06C9135A24BA1136116D279A907247C8D06CF226368B5BB399297509654EA707828019A0F3EEDC76D6EB3649FA774E2BBB5C7286E64A6DCC98E858394A4F459039FBA0F0E3822311B738E5F7B9CCD76AF6236289DFCDE5D54D6136E9CF868BA6384630ADD1E2563856DC4E383936EA8AB723E2B36F7AD0F5D7B9AC164ABC05E27788DDE39FED54E2B5914C6504D5CBB1BFAEEBDDF7B796B5767BDF78118CFCEA512D8894BE8AB9C26759D9DF6AD385A26B4B07BC1E18583E554768573FC25C8EB4CC7BE30A7574C7715C75898F7EE762D0BB4A95A05C8C84DBDBB830F5B5054CA9E2D9429C5177782B07A286463CAA897A394C6A8DA2DE75D5A9B6CB69831FB44A7BAB2E12957151CA8F356303D3AE2824F6137F8B1355EEC064CA75A5F685E5AB08CA5A750700731F6A38FAD07A0E06B55768113A1A4249E2B689E1F23CFF003A0DC5975B79943CD2C2DB580A4A87220D0738DAAEAF611A4EEADC28C242596BB52E2C9093B842B801C48F0F3C8A0E1DA1350CC87B3AD4D708CE316F76DF788BDB1009416F0EA48524939C92063E18E34162E7B7B71C82B66D5A7D0DCA29C079D74A'
    $JpgBin &= '923F1048C63E193F1341AEED16EAD6A2D1BA19326DE52AECE4301C65C3E02140710AFF00764F3E955DCE4E8F67D589ABD8E63AA5E622A3EAB8EC8DC3D9BA5DDE3951C1E9F3A843A154CCCEF62C5BC2116E8F0DD80DBC180ADD5159078A89E9F1AC4A54679362518D6BDE9CF052232C23723A4F1714A4051C67901E750996E534F9B1D5537A9A2B9C5AB5B491E4A74922A33309453542566AD03BBB8DA0361D610E1483C0152726AAAAAC3A162D4D54E65B26CBC6A04EA98D70D3CFAE3CB8EA1F6A3D8083ED073A141038A7AE06388C8959AAA9AFCD6AF6BDBD3DBD366FF19F47AE7E91CE7D9C5EA456AEBABC77A3436B7473C214AF8FC2BA0F1095D3DAA5B9F2131263418795C10A07C2A3E5E86821F691FF00A698FF00DD87FCCAA09CD7CF5DA3E90B83B6394C46B825AFB271E4E46723213D3788C8493900E3208CD62738DC9D99A22B8EF2331CF0F14479F2A6DDA6393E0762965E577B5482A2EEFE4E52ACF12B279FE75A154E277BDCD8A62E514F73E8F2C30A5C8438FA96DA03682782474155EDB6E74F311BD1F3272590427C4BF2E83E352DB553A6CA0A4A9C79C2E38A2A51A9C54A6BB1863A938A9C4B52BB5853525131875ED9A6A599A374CB777889438A7A732DA9A59212EA10C2D4A49C72FDBA4E7A1C55F47A2E06BBF9F57B3E50D9B54ED96F577B3BCCDB98459D0A7108529A74ADD50215901781BBD390CFAD4D'
    $JpgBin &= 'A8D474238A9BA9998C0E4BCD3CD7CDC69481FAA8507BA28140A05028140A0502839BFD226DEB9DB3A754DA7794C3AADD4F9A9D65D611FF0013C9A0F285CE619FB17B24B0ACFD537A950943C92FB6DBC8FD50EFEB41A599B9046F506DBF49A6BBFEA5D3DAB1B00B77EB14692A50E45E03C63E5940AD9B3579B8717B4A366B89EAE54DB7529A9C89A9B1E84936383AA20BFA9A1489B65ED409AC477371C5B7D403CF1E601054011919CD6B5DA62B8DE95AB9445C8AAE46621FA29A525596E1A7604AD3AE4572D0B6122198C9096836060252918DDC631BB818C630315089CBD65BB94DCA62AA67309709ACA6A1E65A7D95B2F210E34E24A5685A414A92460820F30683C29B66D0E9D9DED45C7DF656BD2F3E5ACC25286F088E281296147EE722827A023A126BABCD9DA8723B434B339BB47B7EA844C87A428351550EE4EBCB4B4CC44A405BEE28E10DA41EA4F0F4E3589AA78438B66DDEBB5C514F37B0365BA05BD07B35931E4371FEB999114F5CDC64787B4DC386907FEED19207CCF0DE356446230F5B6AD536A88A29E498D9B36DACCE52D095293D98048C91ED7F4ACAC4A6BA871DCB0BB20B690EB25250A03078A8023E1C68390ED2F69C9D2DB3D9B64B7381DBD3CCBE94107222B7B99DE3F88951C0F99E1806AAA6667669F6FDF573B5DAD8B3E653E94FC1E4484F3F22D37171E714B52DF694A2A392A277C924F535753888'
    $JpgBin &= 'C43CFDEAFCD7C6DBFF00CDEBBFF0B5FF00D41532C55C54D9E43F12C6D763BBF6929C4A82921408DD479D4E257575CC630B305B47FA76F028494879FF00091C38257D2A712D88A9B26CBA4CC9BAC1A2E259536C34EBAA01848E252509E9F7969AD3ED2AF16E8A238D55531EE9DA9F8532D7B95D55D76AD7E6AA9F84ED4FC29966C89C18D637A420A15DC63775412011F63D9B5919FE0FD6A4F56BAEDF5E931A727B54766DC00A1BA809C2F71293C8799550760FA15A6DCCBB70BACD79869E6D0E250A71401DC70B6011F365C141DFF5B4AB54EB56F332A33B21B5828DD502AC751F0EBF2A0B966756DECF9D585714B4E849F2C93FD682174F5A5374D357E61091DE244472334B238A0ADB50E1F98A0F323D2A5DCE36D2AD7DAB84CA862E8D344924B6DBA990303D1B513F0141CF2C37D88C5AC45331501E0B2A5381B2A0EF9711C46283A94E92ABDFD1CCCB8CFC59F32C7745254E200538DB0E0E7E63C4E9FEED577383A3D9B89BB34CF38F9627E5971FB94891234E283CBDF0890DA13C00C0DD5F0FD2AACBAF55BDECD8926445D396C0C2C237C3BBDE1073F687CEAAAEA6F69AC455C56F54B8EC8B75ADC795BCB521C24F2F7B1FC80A86D6E5F5598A6BC42424BAA88B65A61A61294B0DE3EC924FB23AE2AAAEB98974F4DA4A6BA33309ED2961BCEAEBB458115C86879E467B479610865A49DD2B563924790E24E00AC5145776'
    $JpgBin &= '710C6B355A6ECDB7B5737CF28EB3FA4759F76F7A75AD1969D0DA5ED968B5294F974ADD9529606FC97309F19C721838091C00E1E64F52DDBA6DD3B34BE75ACD65DD65E9BD7677CFBA23A4748874CD3AD36CD92125B42500B0851C0E64A4126A6D552E596DCE5C04F5C605E18C60E0641E0AC79D06A7B48FFD34C7FEEC3FE65507CB94C7B53DF1A811DC0D454A8EE67AE01CAB1E78E43FCE835EDB5EC8E3EA6B226669C4223DEA1A3C2D9504A26A47BAB3C82FEEACFC0F0C14D17ECF791BB8BADD91DAB5682E79D19A278C7EB1E3F3E1D263C8F714CB8F25E892197633ECAD4DBAD389295A140E0A540F1041E18AE54CCD33897D32D536AFDB8BB6E734CF09FBFB847A91598A90AECAD2D156454D3B9656968AB62A68DCB2B0B47E756C54D0B96666710DD7543DF57695D3B6C27C4B4C89C7E0B52584FF00FB527FB55B747A30F23ABAA2ABF5CC70CCE3D5C900A9E8FABDA405F8FB55950F4C2377FF001549AEE81F4778E6EBB4588D019C3AC14FC5321A748F9B6D3BF9507B928140A05028140A050282175C4176E3A4AE5163B61C93D81763A4F5791E36FF00E34A683C25686DB4B7B41D08D9DEFF0057372B695735986B2E023F8A2ADE3F9507363348EB41D616A1ACBE8DAC3C8FB4B868CB929B70735774907782BFBE48F40D9A9D1389737B4EDED59DA8E4E5ADA2A732F33554C843783C6AA9A954D4EAFB06DAA5C767774E'
    $JpgBin &= 'ED23B595A7E52C195141C968F2ED5BCF2570191C943873008A6A9989DAA5B9A3D7D5A6ABAD33C63E9E3F7EAF6CD8AEB6FBDDAA3DD6D729A970E4A02D975B390A1FE07A107883C0D4E8AE2B8CC3D6DBBB45DA22BA2731292A92C6BBAEF4769FD6B609564D450112E2496FB35F1C2C75041E841C107A100D0707D9EFD1FDCD237BBA6A5BDCB4CA5DA9C53365CA810E3440CC850F75C292118E852AE7906A34D114F06B58D2DBB1354D3CDDAEC12DE97A32E297D6565969D425479EEEE640A936546CCBD9B87C5BFF00C541ADFD22B5F43D1DA1A632CA9B7AF1210931A31E3BA3B448ED143EE83CBCCF0E87145CBB89D9A78FCBC7E9D7DEE7EBB5B4E9E3663D29FBCFDF178F6DF2A55C2C5729B35F5BF264192A71C59C9528B69A518A6310F3355C9AAACCCEF4158D853B67B821B4EF292E34B2073C78867F5A9E51BB39A573B3234E5DB2923835D3FF00682A71533A7AB8B121207D49149E425AFF00922AC895B72AE0A5BDD8FAE9D53CA080A7DD193C0788280FE62A712DA89746D8BDA2459E4BB7C9B11612D3BDA805390B0CF8928F5ED1E532D8F5AE6DEABBED7534F2B74E7FCD56E8F7444FFAA11ECEB737B5FB53C2DD3FF755BA3DD4C4FF00AA1A4DE1D4B3AE2ED680EA54EC78E2DFBD9FDA3ED0425C39FC4B42CFCEB71EA98510CA621DC92FB0EB64C45E37924038209E3F0141EB1FA2669282EE8371E9C1C4C83D9A53BA'
    $JpgBin &= 'ADD3B982B20FC1C71D4FCA83B1BFA5AC2C6E76EF3A8DF56EA77DE0327C870A0CABA4162DFA4A5C48FBDD9A5A511BC72789CD0476CD3FD8A67FBC4FF2A0F306B38AEE8BFA46439AE3645B0BDDDE6F1C2531D44B25233CC88CB6558F32283906A7B6AED1A8AE166BAD80F7A8729C8CE391F7901450A292A007020E3341B66C61E6D8D5175D1A87D6137A8016CA1CC6F25D464842BFB2A5ABFB22A35C669985FA6BB16AED35CF089DFEAE7F06B7A8612A341B9462D942A34E0168238A31BE9C7E7C2B4A2ACBD8576669C44ABB7475CFB0434C51DAAE315A5D40F686544838F2E355D7332DFD24534EE96476BBACB7125C061C2C6529ED127233C4D5335CC3A74E8E9AE769B0697D23A875ADFA342B4C36FB57D2095A8E1A61B1C0B8B3D123F32780E358A2DD77AAC41ACD7E9BB2ECED5CDF3CA39CCFE91D67F57A4D9D1969D0D6C8366B6ABB67431BD2A52C00E3EE64F88E390E784F203E64F5EDDBA6DD3B34BE63ADD6DED6DE9BD7A77CFBA23A478436CD7685A6DD68CA48DD6D4957A1C2387E86A6D46D5A7DC6DDB242521614030849C1E440008FCC50721DB46D958B1CE3A5F4BDC237D749527B790B4768DB073FB31D0ACF239E033E7CB4355AA9A3CDB7C5EC3C9FF2729D4E2FEB227627847099F1F08E9D7D5C698BADE2EB0EEC5D4B71AECCC44F7B8A956403BCA0548F3493F31C8F426FD3EA22F53E2E4F6CF62DCECCBBBB'
    $JpgBin &= '7D13C27F49F1F9F26E9A874FAED11D8B85B5C709631DAABA83F7FE1E95B0E2B65D35776EEF042F82643780EA0743E63D0D0730DBFEC899D6319CD4360690CEA2651E34704A67200E0951E41C03825479F04AB860A75B51A78BB198E2EEF61F6DD7D9B7366ADF6E78C74F18F1F9FBA63C91263BAC3EE30FB4E34F34B2871B71252A4281C14A81E20820820F115C79CD3389E2FA9D1DDDFB7176D4E699DF130C75A2A71535EE59595A2ADA6A685DB4BD6782F4FBB46891DA53AEBAE252840E6A39E03E6703E75751E74C53D5CBD54FF0F6ABBDF9633EDE11FF0074C27B6D33A2C78D698915C4389714F38D2D3C9715ADC88CAFE0B5C690EFFF001B3D6BA6F9D39AF7DF5A0F4D7D08ACCA9773937B7124B6DAD6B49C7B2A423B341F8283EF8F8B741EB7A05028140A05028140A050783FE9270E4ECC76E36CD570E305C70F83D91E097908C7D99F242985A59F5ECDCF2A0E31AFE0B5A7B56CDB645794F40CA645B9F3FBE88EA438C2FE25B5A09F2391D28370FA376B18365D7E6C77E58FA83534755A6E014AC253DA706D64F4C288055D12B51A23553155334CF097DD65A6A6693D5971D3D7049EDA1BC5BDE231BE8E6858F42920FCE9353C56A6DCD9B9344F24725BF3E6381AAE65A7554C869BCA0F0AAE6A5532EA1B0BDA9DC767D75EEB28BB2B4FC95E64C6CE4B4A3FBD6FC95E639287AE08A266AA276E9F6C75FDFF00DA794C'
    $JpgBin &= '6EE87B42E692E6637D33C63F58F1F9F09E531ECFB35D2DF79B63173B6CA6E5449080B69D6CE4281FF1F4E62B72DDCA6E53B54F07B6B37A8BD445CB739896B332D1A9989AFC98D2B7BB45957D9B98E7E86A6B565567D51720199AFA92D678F68E70FC873A0D923D9D30F4EC8B6C53BCE3AD2C152B86F2D49C67D3A50687A975231B2CD333AE575EC5D99202530A2A1CCA9E58CF3F248C8C9FF2AD6D45FD88C53BEA9E1F5F5439FDA1DA1468EDE677D53C23EF94737923515E2E7ABA6DDEE176989727CDDC3BCE2B09002C1091E4001802A8B51B3C67333C67ABC653A8AAE5CAABB9399960C14AAD16C650A75875C1254B2942B7814948183F91ABA659B97623130C23695A24197649E86F20FD9AD7B8B4FE1C9E0454A257D17E9951260DEE5B0A6A65C63B6C9E2A4A9E183F24E73538A9645CA639B1E5331E2DB9A84C49EF0A4BAA714B08DD1C40181F954E2A5772EC55C152EDADEA2951DA65D0CDCDCDD6B0B04A1D3C81C8E47CFA70AC5EBF458B755DB938888CCAD9D5DBB36E6BB93888E2EA2CBAD6CF748C99B2A6C7908B6371E6B484AC90E3C953821344103DB90152149FB91B3C88AD7D15BAE9B7B773D2AA733E19E11EC8C47B1E93B2F4D558D3C4DC8C55579D3E133CBD9188F63CF939F857890B9C99E98B31E515BE87F3BAA5939528286799E383D6B6DD26D3B398AE5CF51596C8243571ED262DC92DB2B2ADE8E11B'
    $JpgBin &= 'CE27881C4A52A481D54523AD07BCED7A127D92DF19AB54B405B6DEF2F0B285768AE2BC11CC15127A73A0CB634ADDA63E872E933091C0EF385C5E3C86787EBF2A0DA67400E591DB745DD482CF66DEFA8E070E193C4D061691B44AB43321B92B657DA2814F66A2790EB9028380FD39749F7FD30CDED97931C30B0F3AA2D92158C214091D4A54D9E47C2C93D283CCBAC8DE275A6CDAA58BFB2A6A6B5DCA62D13C84A65C74A52ACE71C54D165CF52A5795042694BDA3476A483A99A98D5C2E502426432D36496CA81CF8D5D41E2081E741DBB6C312DAABDC6D63684191A6B57C54CD6B1CD2B382E24F92C2B891D1448E95CDBD1DDDC9E93BFEBF7E2F7DD935C6BB474CFE2A314CFF00E33ED88C7AE999E6E782C8CF681712E8CEE6723B50A4287A7006AA9AE1D3A34773A24EE2A6DEB9BCEB67790A5641F3AD6AEADEEFE9AC4C511130F406C197A72EF658B64B5B91A0DF5B63FD6D12164B92CA493BE82071001F63DDE3CF8A8F534772DD546CD3C5F36F29F41ADB3AA9BD7FCEA6A9DD3CBD5E18F8F1EAEC369D1A5A94976E121B750839ECD00E15F127A56E3CC365BBDBA3DCE12A2C80704E52A1CD2AF3141E6ADB0EB0916A764E9CD277E8E1FC96E5CC69E29ECBA14271EF742472E438F2E6EAB5B14F9944EF7BBF27BC95BB7A29D56A68F378C475F19F0E91CFD5C78C408512D6E896B7C4B960E50123C093F7893CCD72AAB911'
    $JpgBin &= 'C1F47B3A2AAA9F3B74333B6928B840BB5BEEC985322B780A20939C9273D0839C1079D66DDDD8C4C4EF55AEECD8D54556EBA734CBD7BB29DA359F5E4075805B66E8C27FD6629E4B4F2ED119E6839191CD24E0F304F734DAAA6FC78BE47DBFE4EDFEC8AE2A9DF6EAE13FA4F8FCF973889787A6A540BC1996F96DA19DEFD92C13949E6935B4F3CDA683C89F4A0B8E8DBA6B06D5A7DBED2ECD65BBA4B648EC1D206129FC4E27182B1D3093BD81B9C7D75EB75558A78C737D47C8FECDD7D8B3372F4E2DD5BE299E39FCDE1FAF4E12E3AB4569D353D5DCB2B2E22ADA6A73AEDA6D9A02DD21B6DCB932F222CC7D7DCEDEFB9C12C3AA4A94B924F44B0D21D7C9E9D9247BC2BA1A3A339AFD9F5FBF5BC3F955A98A229D253C7D2ABFF18F74CCFAA69721DA1EA88B7ED592A65B5B5B16A6528896C657CDB88CA036C83F8B7120ABF1151EB5BEF18D7D3314A2129CA9478000649341FA3FF463D2474AECD62B4FA0264B890DACFF0001515F1EA3B65BEA49FBAA4D0756A05028140A05028140A05070FF00A5EECF0EB5D9DBEEC364AE7C7DD2CE0712E2492D7E654B6FC876E547D9A0F0D28AB566CB8632ABDE90052A4E3C4FDADC7339F52C3CB39FC2F8E8DD068297958DD51C8A0F51DB2E49DB1ECA18BC2561ED6FA5184C7BA359FB49F086772401CD4A4F1DEF5DE27DA40AA6F4EC79DCB9FD7EBFB387DB3A49AE8EFA9E31C7D5D7D9F2F5'
    $JpgBin &= '347658C8E3D7AD55554F2D864B2CF318E955CD4CECAA0C7A5426A4661D37627B4CB8682B908724B92AC32559911F392D13FBC6FC8F98EBF1C1AA7BCAAD55DE51BFAC75FDFE7C2794C6D68F5F7345736A9DF4CF18EBE31E3F3E13CA63D8165B942BBDB58B8DBA4B52623E80B69D41C850FF00AE9D2BAB6EE517688AE89CC4BDAE9F516EFDB8B96E7313F7EFEB1C921535ED6F5E6AAB568DD3CFDE6EAE8DC4021B681F1BABE894FF00D70AD6D46A69B14E677CCF08EB3F7C7A3475FAEB7A3B5DE57EC8EB3F7EE789B685AB2EDAD351BF78BABBE25F859641F032DF4424797F33935CDA2673355739AA78FD23C23F7E2F03A8D557A8B9372E4E667E1E11E11FBF16B2A455F15288A94293538A928950535644A512B6A19E752894E2565C455912B29A9BB68AB740B0D9266B1D4256C428EC15829202CA0F009467F78E9F023C81528F841239957FF7F53DD47F2EDCE6AF1AA37C53FE5E33E388EADCECCD37F696AB7FF2AD4E67FAAB8DF14FAA9E33E388EAE51B5ED7AE6A99ADC184E27B830F2A43CB6D25089525494A0AD293C43486D2865A49E21B6C120296B15DA7BC73EED57E741EBCFA046CF572E6BBACEE0C9ECCE3BBEF0E6DA17C0FF69E4641E63BB11C9541ED9A05028141ADED1B4F31AA3484EB43EC264171B56E36A38ED3C252A467A05A54A413D02CD07E72DA6C8BB66A8D47B20BCBD845D1C42AD321D1B8133900AA'
    $JpgBin &= '1BA73EC8750E29A567976C09F628397BC244590E30FA16D3ADA8A1C6D692952540E0820F22283BFF00D1BF52C3D51A666EC76FF2DB64C8715334DCA79580C4BC12A609E89738903CCAC712A1546A2D77B46238F275BB17B4BFB3F55172ADF44EEAA3C3C3C627131E318E132B52ADF2A04E7E0CD616C498EE16DD6963050B07041AE25553EBD6AD533115533989DF131C26277C4C2B699C2870E1545553A56EDB361AE44298D4B88F3B1E432B0E34EB6A295A14388208E208A845CAA9AB6A99DEBEEE92CEA2D4DABD4ED533C625EA2D89ED758D50DB361D48E371AFA06EB4F6025B9B8F21C92E79A791E69EA94F7F49AC8BF189DD53E37E51F93177B2ABEF6DF9D6A784F38F09FD279FADADEDE76C051DE34B69095E2E2DCDB834AE5D0B6D11D7A150E5C871E23535BADE36EDCFAE5E8FC94F2473B3ACD753E34D33F3ABF48F7F479E0009193F215C97D39F09C9A32F99A0CDB2DD27D9AE91EE76B96E4599197BED3AD9E293FE208E041E04120D4A8AEAA2A8AA99DED7D5696D6AED5566F53B54CF18FBFB87AE763FB50B66B7B496E62DA85798A8DE951CAB09524737119F77CC734F5E1827D0E97594DFA77EE97C4BCA2F26AF764DDDAA3355AAB84FE93E3F3F7C472FDB86DA17720F69BD1B214DC1E2895716CE1523CD0D1E88F3573574C0E2AD1D66BF6BCCB7EF7ADF25FC8E8B78D5EBE9DFC6299E5E3578F872E7BF747092'
    $JpgBin &= '918C62B9597D1E69895A7115653534EEDA5EB2DA64DE2E8CDBE2A32E3AAE249002475249E0001D4F01D6B62D5355CAA28A78FDEF713B4F536B41A7AB537B8472EB3CA98F5F3E91133C903B53DA45A8DA5ED3BA4A4179A536B81DE92149098DBC0BC539C12B90B42327A32D328C92A700F41451145314C7087C4F537EE6A6F557AECE6AAA733F7F28E4E2DDAAFCEA4A1D6FE8B5A265EB3DA7C25252447B7388794BDDC80F1C96BD3C3BAA7707810CA875141FA636F8B1E0408F062B61B8F1DA4B4D207BA948C01F90A0C9A05028140A05028140A050589B198970DE8921B4B8C3C82DB883C94923047E541F9F5F490D1B74D926D713ACADB1D2F5BE73CA1210E27EC9E2E2541D6DC03DC7DBED320638F6A060241A0E31AE2C916D9706A759D4EBF61B93664DB5E5F1586F38534E63F78DAB28572C90143C2A49217B66BAB6F5A1356C1D49627B725C657890ACEE3CD9F69B58EA950E1F9118201A84CAD8A773D1B7FB3D9755E9F4ED0F4237FF0092642B172B70C172D720FB49207B84F23CB88E98C73EB8EE6713E8CF0F0F09FD27D9C719F1BDA7D9B3A3AF6E88F327E13D3D5D27D9D33010ED8B5292424D665CDD999668B2AF96E557531344ACBF6C5249514D5354A9AA1BC6C7B68B70D0774EE924B92ACB21797E3F32D1FBE8F23E63AFEB5AF4DEAF4F5F796F7E78C75F18F1F9F09E5312D1EBEE686EEDD1BE99F4A9EBE31F'
    $JpgBin &= 'D5F3E13CA63D3B335558A2E9456A676E2DAAD9D97689752ACEF79240FBD9E18FCEBAD56BAC458EFF0039A7E333D31D73BB1EF7B2AFB574B4697F8ADACD1F199E98EB9DD8E5CDE42DAB6B7B96BBD40A9F272CC26894C38D9C8691E7EAA3D4FF002AE3F7955CAE6EDCE33F08E91FACF39F0C447CFB59AFBBADBD376E7B2394474FACF39F0C44696A6874AB62E3562B5A537564569C54B4B455B4D49C54B2A4D5B4D4B2256D483E556C4AC896D1A234A9BAAD572B929B8F6B8E953AE38F2F710529E2A52947D96D3EF2BE438D73F51A9B97AE7F09A59F3FF155CA88EBFE29FC31ED9DC959B57B5B7FF85D36E9FC5572A23FF69FC31ED9DCE6BB6DDA0A356DC5BB4590B88D3D0164B1BC9DC54B771BA5F5A7A70F0A13EE27F12964F5F4DA5B7A5B516ADC6223EF33E33C65F44D0E8ECE8AC5362CC629A7EF33E33C667AB98D5ED96D5B32D1F375C6B287608497375C5054871B4EF169A0405280EAA2484A41C654A48EB41FA91B36D2F0F48692876688CB6C869B4EFA50721242424241EA1294A5393C4EEE4F1268366A05028140A0F1FF00D3A3652E4B889D73668C4BF142D6F840E25BC95B83E293BCE8F453D93E148A0F30EB450D5B664EB98E02EE49288FA85B03897CF044BC7DD780F11E8E85138ED102835082EBD1E537218716D3CDAC2D0B428A54950390411C4107AD46653A697AA34B5EE3ED9B4E09690DA35FDAE3813E'
    $JpgBin &= '32404FD6EC24603ED8EAEA46029239F4E1BA073759A69AFF00E651C79C75FDFE6F75E4B76FD3A6C68F5538B73E8D53F866794FF4CCFF00A677F09947C5B72963D939F85723197D376FBBDD2CFF00AA56403BA788ACEC2BFE2A165EB738D94900829E208E879E6B1344C274EA29AA3128C92C767C48E0390A8630DBA2E6D30D6924E4FE545B12A303CBFA5197C38F89A32F9415216B49250B52494949C1C6411823E041228C4D313C4CD19307CA82B8F1DE9521B8D1DA53AF3AADD421232547C8566989AA629A63332A75176D58B555EBD56CD14C6666797DF28E333BA37A176B7AAE3E96B4CAD0F6290DBD779492D5F66B472184F588DABCFA3847F075583E8F49A68B14EFE33C5F0CF28FB76BED7D46698C5BA7D18F9CCF8CF3E9188E599E195B4F3AC9831A44D98CC386C2DF92FB8969969B49529C5A8E129007324903141FA45F44ED9835A0B42477E4210BB84A495B8E278852958DF503D53E14A53D0A501431BE45076DA05028140A05028140A05028141A4ED7F41DB3681A426596E31C3A5C68A518212AE87014791C84A81E414919046410F036A9D9BEA2D08B95A6752C5932F4ACB78BB0EF2C475AD109F1E10F2929C96CF0DC75B3C481C37CB683589661A4C1D15AADEBB3B6D8DA76E532434405F748CA7D2410085052014A92A0410A07041041208A84AF898768D8FE93DAD686BCA6F36BD353D0DBA8ECE5C47921'
    $JpgBin &= '4DC96BAA168CE4F5C1C6474AC4D11544C4C66250B914574CD356F897778BA32DF7F68DC6C70245B24E37A559E520A1C60F528CE37919E47F9721A7366AB5C37D3F18FAC7C7D7C5E6EFF64CDAAB36B7D3F18FAC7C7D6BA3433A7816F77AAB8721D7F4CD3673BD4FF03331B9AA5FB4F163787678C7A72AD6B94E1CBD4599A5A4DCA006D44118AE7DCAB0E45DDCC17E64F36B4DA8CA78C243A5D4B0547702F18CE396785696288AF6F9FDEFC75C6ECF1C6E73EB9889CFFB67AE38671BB3C708C5307CAAEEF1AFB6A54C1A9C5C662B595B38FF00AC55B4D6B22A63B8D81E55B14D6BA9A86623AFF14E528271BC46067C8799ABE9AB1199E0D8A77C667836BB6693B742B5B97ED5121AB6DA6360BAF49594E49E21240E249C706D20ACF1E1C2B528D45ED7CEC68F753CEBE5EAA639CF8F08F16CE8B497FB527674BBADF3B93F2A23F14F8F08F172BDB1ED227EA98C2C962812ED7A5DB50385B7B8E4D29F656EE38048E696C1294F32547C55DCD1E8ED692DF776A37719EB33CE6679CCBE81D9FD9F63B3ECC59B1188F8CCF3999E733F7B9C8EB65B8CAB7C4953E731060C7724CB90E25A65969254B716A3809007124938C507E867D123636CE82D36DDE2E6DB6EDDE580EB8E70237B040DD3F7120900FBC4A95C4146E87A0A8140A05028141837AB7C6BA5B5E8129214DBA39F0CA48E21433D41C1A0F06ED77629A97673AC66DFB495'
    $JpgBin &= 'A4DE2C2FEF3770B534852B0C39ED36503C4A6558CA549CA9B5279853616438D5CB49CE45C19558615C2E70266550948614B78631BCD38948E0EA0901431D52A1E15249AE5753C1BE685D99ED3E25C22DE2D7A6EF56F9719C0EB2F96FB0710A1D405107F4E3D4522259DA87A5EC56C91AAD28775058DCB0EA93C1E0E325B8B7257DE49E4874F519C13F138D4BDA48AA76A9E3F37A6ECAF296EE9EDC69EFCE688E13CE9F0F1A7C38C72E892FF429D4E5B5475B6E278142C711FD6A8FE1DDDFED98E39DD3CF9213526983114A6FB3F124615F1EA3E5CBE5555CB386FE8BB4BBDDF973CBDC0EC94722B4ABA70F51A6BFB50D624A7754462A975A89CC315592791344F7001F4A19303AE6865F787A7E7437991E7F90A1866D9AD53EF333BADBA3A9D5849538A2708692064AD6A3C129001249E82A76EDD776AD9A2333F7C5A9DA1DA1A6ECDB1DFEAABD9A79759F0A639CFC239CC20B5BEBD8FA720C9B2ECFDC72E1737125A9DA8196D5B8D0F79B8A7F42EFF73A2CF7F4BA3A74F19E3575FA3E2DE51794BA8ED9B9B38D9B54F0A7F5AA79D5F08E11CF3C1C820904107AE6B71E654D07ADFE85DB11767CB6B5CEA28AA4B3BB984D2C60A5B50F6FF89693E1F2412AE054DAA83DBC84250808424252918000C003CA82BA05028140A05028140A05028140A0D6B52D994EAD77084825D3C5F693CDCC0C6F27F18000FC4000792480D75B50'
    $JpgBin &= '71086DC5E463ECDCE381C4F03D719CFA839F5151499715B29737563041A90D9AD71924216B4714F1492391F4A30CF7E332F21495B693BC304E2A334C213444B9EEB6D28F3CD29F8884BA90388482555CFD4DBAA9899C6EF0DEE2768696BC6D4467D5BDC3F535BDC8EEA92EC75A083EF022BCEDDBF4553314CBC56A2E51333112D4E435859C240AD1AAEEF72AEDCDEC45B47269175A555CDEB2E326ACA6EB31714B36F952DCDC8F1DD7947A2104D5B3A9A2DFA75442DEFA9A78CE1B2D87677779E0BEEB210D238AD6A23B340F352B2123E647CEAFB37AF5FF00EEF6E6AF19F369F7CF1F644BA9A3D2EAF55FDDED4D5E33E6D3EF9E3EC894FA23696D327B4462F37148C00D9C328F42BC711E881823DEAE9D9EC6AAECC55ADAF6FF00A63751EDE757B77783D568BC94A6662BED0AFBC9FCB1BA88FD6AF6EEF069DAAAE122F53912E786D4A60111DB4A30DC707986D3EEE7032799C649278D77A9A62988888C43D7D34C53114D318886AD7024E7279D6596817FD20C5CE6A3EAD6D4D4B79610969968ABB5513800247BC4F973F2A0F527D15BE8F51F4E046A9D4CDA245C9C41080A00A5A491828474E238294398CA52774A8A83D500000000003800283ED028140A05028141177EB522E4C24A5494496B3D93846471E6950EA938191E808C10080D39497A338EB121B5A704075A51C949E3820F5EB8572233CB88114971A6B7540E'
    $JpgBin &= '42927D9579FF009D6604F5AE38746EA91BC9230411906B227551D95A521C6D0BDD1C09158988922BAA9DD12D4B5769A54B6D6A8C12B246704F8FE5E7545DB3B5C1D9ECFED28B53115CBCFDAF6DAB83256879A5A4E7DE494FE84035C6BF4ECCE25F4FEC9BDDFD11551BE3C37FC9CDAE384AF80038D69CBD459DF08E71473586C44428249EA686E2894466710CFB259EED7B9223DA2DB2E7BA4E30C345407C4F21F3ACDBA6AB938A233EAFBC35F59ABD3E869DBD5DC8B71FD53899F54719F6436E87A1A0DB007B565D50958E3F575B941D78FA2DCF61BF5E2543CABA567B2EAAB7DD9C7847D7E9EF782ED5FF0088362889A3B3A8DA9FCD54623D94F19FF363C695BD49726A5DB7EA7856F8F6FB3820986D7883A4710A75478BAAC8078F00464006BAF6ED516A9D9A2310F99EB75FA9D7DE9BFA9AE6AAA79CFCA39447846E6A33B8020700390F2AB1A8D275658A0DD52A53A80DC81ECBC81E2F9F98A0E87F46CFA3ABDA8EEF1EFDA8D0176A64A5D65875AC21E1CC2D693CD1D424FB7D7C1ED07BB6D70635BA13712237B8D2075E2544F1249EA49E24D0665028140A05028140A05028140A05033414950141057AB435254A91192843CA395209C25C3E7E8AF5EBC883818C6194435BED12DBA9502838E230A47A1F4FCC791E74865396B9206073AC89254B68273BD44503779642CA90B2950E441C5126B1759DDB829991A2CC4FFE'
    $JpgBin &= 'D9A04FE6307F5AD5D4692C6A2317A88ABD7112D5D4E874DAA8C5FB7157AE225AB4EB5E9690A2A7B4F361479969F29FD140D72EBF2774157A34CD3EAAAAFACC3897BC91ECBB9BE289A7D5555F2CCC7C114F583470249B4CD1E81F47FF00D2AAFF00E31A5FFA95FF00AA3E8D19F21FB3E673B75FFAA3FF005522DDA4A28DEFF47DC5797692464FC8207F3A9D3E4D68A3D2DAABD754FE985B6FC8BECBA7D28AAAF5D53FA616DEBE7764EE5B6D56E860723D976AAF9EF920FE55D0D376568B4DBED5A889EB8CCFBE77BB1A4EC4ECFD1EFB166989EB8CCFBE733F16BD7BB95C2E2419D31F9013ECA56B2529FE14F21F2AE83A8D72675A0869C95046F949DD564056381C73A08FB7592E97FB80836A88B90F1E2A23825B19C6F294782474E3CCF01C48141E8FD8D6C5ADBA6F72ED7B0997715279A924048238A520F14A4F239F128703BA0A9043B5A371290948094818007000505608A0FB40A05028140A0F848A0F85605046DDE0C6B8206FF81E40210E819233CC11D5278647C0F020101AE18EFC378B4E20615EE8394AFD527FC398E3CC713149256D9012A1824F966A4275329BDD05478E288A32EF292A4652787F2A0D4EF328BED299928665347816E436971247C140D42AA62A8C4C65759BD72C57B76AA9A67AC4E27E0D1AEDA4F444F51549D311D970F58925D607E40948FCAB52BD069EAFC38F5661E934FE5976D588C45FDA'
    $JpgBin &= '8FEA8A6AF8CC4CFC5AECBD9DE860A39897C67D133D2A1FAB755FF65D9EB3EFFD9D1A7FE21F6AD3C68B73FE5FA4C31C688D08C1C9B6DE2463A3971091FF000B748ECBB1CE667DBF446BFF00885DAF5479B1453EAA3EB32BCD40D2F6E39B7E91B5850E4B965C92A1FDF56EFE957D1A0D3D1C288F6EFF009B93A9F2BBB6B531B35EA2A88FE9C53FFE62145D6F5749318C55CB5371B18EEEC2434D63F810024FE55B5111118879EAAAAABAA6AAA7332D5E672ACA2879895292B2949213C5440E5F1A0847987E5484468CCB8FBEEA825B6DB495296A3C8003893E941D7B645B0E54C90CDE755A51D9A4EF2229C2D03F8BA2CFA7140EBBDC5003D2D6D8D1A0454C688D86DB4F4CE493D49278927CCD066050A0AB340A05028140A05028140A0507C2682852F141656F63AD063B9271D68315D98075A24C3952197B05C1E24FB2A1C08FFAF2E468319A95DDDD0B6DDDC23DE0387CC7F4CFC05048B7708521B1DF1BEC73C03CD9CA09F88E47E34CB0B72EC66537DA419A8524F2DEE20FCC7F4A196BB72D377A464A6287879B6E0FF1C1AC619896BD2ECD77413BF6C9891F7BB1563F3C561899473D6FB8367ECEDD314AFBC5857E831526188BB15F241CB767B8AF3D4465FF003C505D6367DAB2611BB6C2CA4FBCF3A94E3E59CFE9412B1363EF7665FBE5F63C565032BEC51BD81FC6AC01F91A0C192BD9D69E78C4D39627757DE520E14E'
    $JpgBin &= '65E693F895C37481E6949F88A08591A52F9ACAEA8B8EB0B8A1A6D0375A8510808651F752465291CBD9DF27A9078D074AD2568B2E9F8A862DB1196824E46EA791C633C7249E9BC49563867141B433341EB4196D4A07AD06421FCF5A0BE973341702B341F681414955050A73141656F63AD06339271D68315D98075A24C49131B71050E04A9279822A230CBEDA1590B51F239F10FEBF3E3EB41231EE8DBA9DD92DA5F40E6E37ED247A8E7F3FE752CA2B8BB7C4B8B6550678F549F163E5C08A3283B9699BC0C9690D3E3F02F07F5C563044B5B9D63BD21477AD72CFF0B655FA8CD61999453D02E69F0AADB308F22C2811F0E1524588ED9AECF7EC2D739CF41197BDFCA8296B44EA9987EC6CD2123CDD296FFE62282520EC86F728833EE10E120F30805D58F9701FAD05172B16CC3491DDB94993A82E40E130DA5EF657E5BA8C01F0513F0341057C89A9757A136E72244D29A7D0BDE45BE3B602D44722B40C655FC7B83A804D06D3A274869DD3C9DF8F1838FA9385BAE1DF5AC79156070FC20049E19048CD06FAC4F18001E14198D4CCF5A0CB6E467AD05F43B9EB41792BA0AC1CD07DA05028140A05028292682DAD5418CEAE830DF771411F264119E341172A591939A248B93705249E3511152AEE520F88FE746514EEA77E2ACAD97D4856307079D0C2D47DA5F747BED6228A89F6E2B85A59F97B27F2A184E46DB3D96380999765'
    $JpgBin &= '32B3FBB97137B77E2B6CFF008511984BC3DB069574051BE69E715EB72EC88FECAD031F9D49866FFDABE9B29CA6E16557C2F31F1FF35061CBDB069E68102E9A6D07CDCBD215FA212AA0D76EBB6884B0A433A9EDCCF97D5F01C90AFEF38529FD28350B9EB6B65DDD0B929B9DD959C83709443693E696DBC01F0C9A0CA87A896E34196D0CC76339EC586C368CF9EE8E19F5A09B837552B1E2A09C853D471C6826624B271C682563482473A09161E3C38D06734E5064B6AA0C8A0A54682CAD5418EEAE830DF748A08F90F919E341172A51E3C6822A54F29CF1A8A48B93765273E2E5465132750B8CAB7D0E94A871041E5430C756D15F8AE854965A9583C17928707AEF2789F9D0C256DFB6AB5324264CD9D171CC48653213F9A4855672C4C27A06DA34B3E3C57EB093E4EC95C73F92D07F9D65149236B3A656329B9D8D7FC37963FC48A0C795B5BD3884906E5A7D3FEF2F8D0FF941341073F6D169196DAD47616F3C951D0ECB50FC825341A95FF68B1AE396E5DCAF7746D5C93BE9891963C8A51927F3CD060DBF5321B1BB6E8916DE82307B04616479159CA88F89A098817652B1E2A09D857151C71A09A87349C71A0978B249C71A0938EF93D6833D974D065B6BA0C842A82E034155028140A05028285505A705062BA0D060C849E3411B29078D0444C6D5C6820E734BC1C50405C59730460D630CC4B5E9D0DE502A51284799EBF0'
    $JpgBin &= 'A619CB58BBB2FA77931D0539E6A3ED1FE94C1B4D2EEF6A96E6F6378D651CB50B9E9D9EB2774AC50413DA32E0B777D2EBC3D3341256CD2F3DA232A59A0DB2D36698DEEE77A836EB55BDF18DE06836BB643786381A0D9ADD1DC18E06836280CAC6381A09D84DA86282622215C282523A4F0A0CF641A0CB6850651E54142A82CB828315E068305F49E3411B25078D044CC428E682126B4BE270682067B4E6E9E078D19CB5CB930E9CF0358C3396AF7688FA81201A60CB53BADB652F38C8ACE18996A375B0CD71471BC3E1461AE4DD233DE567B47527D282EC0D2970654015B87E341B3DAAC73118C85506E5648B2D9010A1BE83CD2AE46836CB6DBD4B00B3907EE2BFC0F5A0D86DD15D49008208E941B1DBD958C703413D09A570A09A88DAB8504AC649E14124C24D066340D064A0505E4F3A0AA8140A050281402282DA934169C6F3418AEB39E94186FC5CF4A0C0910B3D282364DB77B3E1A08B936A07242378F991C28226658CB84952493EB41132F4D8513F67FA5045C8D28957EEFF004A0C07747209FD90FCA82C9D169CFEC87E54175BD1A8FF00BAE3F0A0CC8FA4929FDD7E94125174C84E3ECFF4A0958960DDC783F4A0968B66DDC78682562DB318F0D049C7838E94120C45C74A0CE658C74A0CA6DAC505E4A31417683E114142939A0B0E379A0C6759CF4A0C37E367A5047C8859CF0A08D956ECFBB41172ED3BDEED044C'
    $JpgBin &= 'BB1EF67C141152F4E850F63F4A08A91A582B396FF4A08F7F4825478B5FA5063AB46233FB11F950548D1A8E45A1F95064B3A452923ECBF4A0918DA5C271F67FA504AC5D3DBB8F0504C45B410005A3780EBD4504A45B501C40C81E9CA824E35BF18F0D04947878C70A0CF66363A5065B4CE283250DE282F2534158140A05028140A05028141F08068295201A0B6A641E9418EE309CE00DE5797F5A0B0B8215ED0CFA7414165CB7A4FBB418EE5B127DDA0C772D093EED059559927DCA0B46C88FB9414FD469FB941F458D1F7282E26CA9FB8282F22D091EED064376B48F768321BB7247BB4190DC203A505F44503A505E430074A0BA96C0A0AC240A0FB40A050283E148341429B0682D2D807A50595C607A5063B90C1E9418EE5BC1F768319CB624FBB418EBB424FBB416176649F7282D2AC693EE5051F5127EE507D1634FDCFD282B4D913F7282F22CC91EED05F6ED291EED064376C48F76832116F4F0E1823A8A0BE88BB9ED27879814192DC74E01141792C81D282EA50050540507DA05028140A05028140A050283E29412324D051852F9F853E5D4FF004A0AC25206000050374507CDC141F3B24D052594F9507CEC13E541F3BBA7CA81DDD1E5FA503BBA7CA83EF609F2A0FA194F9507D0D2682A08141F424507DC5028140A05028140A05028141F30283E148A0F85B1414964795052584F9507C3193E541F3BB27C8507CEEA'
    $JpgBin &= '9F2140EEA9F4A0FA2327C8507D11D3E54150613E54150680E941F43605055BA2828DCC1CA0E0F974341F52A19DD23755E5E7415D028140A05028140A05028140A0B7BC55C1BE3F88F2FF003A0A92900E4F15799A0AA8140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028141F14028608C8A0A30A472F127F51FD682B4A828641A0FB40A05028140A0502829528038E24F90A0A774ABDBC63EE8E5FE741728140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A050281414A9209C8E0AF31414EF14F05F0FC4397F9505CA05028140A0F8480324E050500A97CBC29F32389A0A929091C07C7D682AA05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A0B7B853EC631F74F2F9795054950271C41F234155028282BE3848DE3D7C850128E214A3957E83E1415D028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A0A5490A1C47C3D28292549E7950F30388A0AB7D1F793F9D05540A05028140A05028140A05028140A050634E97161349765C962336A712D85BAE0402A5282529C9EA49000EA481418726FF00'
    $JpgBin &= '628CD38EC8BDDB996DA756CB8A72521210E21256B4124F052520A88E60024F0A0ADCBCDA1B71E43D758085B2A690EA552100B6A7783615C7815E46E83CF3C33414FF00A4163EC3B7FAEEDBD9774EFBBFDE91BBDDFF00EFB39FD9FE2E5EB4176E576B5DB56C22E37385095257D9C7121F4B65D5FDD4EF11BC788E02822ADFAC2C32EF536CEA9CCC49D1669841890EA10B90E06D0E12D277B2A187074CE41E1419B2AFF618D04CD7EF16F446CBA03864A37545A0A2EA41CF129085950E9BAACF2341048DA7684541B55C0EA6B6A235CD6A6D8714FA1212B4B61C525C24FD990149C856305690789141B1BB7AB3B5776ED0EDDA03772753BCDC3548407963CC233BC4703D28311ED55A6196DD75ED49676DB657B8EA9539B010ADE52704EF703BC852707AA48E8682D31ABB4E3FAA9ED2EDDE627D6ED34877BB179216B0B4A9637067C44253BC40E49209E0450675BEFB64B8BD29AB7DE2DD2DC8871252C4942CB3FC601F0F23CFCA8238EB1B0392ED4C409EC5C937396E4469E84FB6EB6DB88696EA82D415C3C283CB272470EB412C8BB5AD76AFAD917286AB76E15F7B0FA4B3BA39AB7F3BB8F5CD061BDA9F4D336D8F737B515A1B83215BAC495CD6C34E9F24AC9C28FC0D0573B5169F812531A75FAD715E56E6EB6F4B6D0A3BF9DCC0273E2DD563CF071CA8322D976B55D3B616DB9C29C63B9D9BFDDDF4B9D92FEEAB749C1F43'
    $JpgBin &= '419F416643ED468EE487DC434CB482B716B384A52064927A00283519FAFA3C5D231F5537A7AF72EDAF32EC8538D2584169941F0B8B0E3A8E0B4F8938C9C7300F0A0C399B51B6456A5487AC5A8046808655717BB068261171B4B810E24B9BC5412B4E7702867913412B78D6912D77D62DB2ED17A4B0F4B661A67F7602376CEE371209505AB25406F252520E413C0E02DBFAEE031774437AD17A6A22E70B7A6E4B8C1318C82ADC08C956FE0AFC3BDB9BB9EB417226AF13752CDB2C3D397B929832C44933901811DB594217C72E859012B493841F9D0494EBFC48BA96DFA7FB379E9D35B71EDD6920865A40E2E39C7C292A2948F327D0E02374DEB0FADF52C9B03BA72F56B951A2A6538A9818280952B75232D3ABC2958510081C126836BA05028140A05028140A05028140A05028140A05028140A05028140A05028140A0502835DDA3DA245F743DDADB0C0335C60B9101207DBA085B5C4F01E34A78D073AD1DB3CBE2AFB346A3881BB6DC624A9D2076C85EE4E9884B6EA3009F6501632381DFE04F1A0C5D09A135933A96CF74BFC54A51254CBD781DE10ADC721B6B6E37251CEF1295F0CE377070683123ECD355A2EEC85444882DCA3663F6EDF1B38921F0BC6F7503B3DDF6B3C718A0DAF6A964D417E55B6E168D30B5DC184C861264C98CA69292E2301F697BC95B2B080ACA4F689C278039C05BB968CBB3D36F53516964C991'
    $JpgBin &= 'ABEDF3D8777DBDF315AEEDBEBDECE401BAEF84F1E781C78861DBF4BEA9EFD65B4BF615370ADF7ABA4A767AA4B25B71A90893D994A02B7F9BC90410083D08C9015DBAC3A9A2694D0FBFA496E4CD312035261A6547DE94D888A64BCDA8AF77054A070B295784F0E54145CB446A291B4D97356C4D76D726F512E687D97A221B40650D8C2CAD0A7F7816C80941DD20F34E4D0513B445D9AD04CC7674EADDBC22F93A7031A4C743A8ED1C7FB3708732DBA9285A12A42C8F0A8F518A09BD3963D436ED59DBCBB2C608B8D821C47A54153686A0C8650F6F008242B7095A427701C70CE071A0D56DBA07544AD3EBB52EC91ECAF44D20FD8C3FDE5B52673EB2D90B1B84908FB35125601CB87873A0CAD51A2AF5AC19B7B0DE9856911DE54995223CB614F6E77275A0A504120A7794946012A2951C84D04FDE6DFA96F9B39876B7F4C2224F82A8121C861E644792597D2A7196F75442414B608DE0061691D15808DBBD8AF6EDCA35FA36CF58DC722DC233B6B4CB8FBE85BE5A297D6490DE541B21412A51008E7C4008F93B3ABE8D2F7EB7BB6C8F366B9A4205AE1BBDA3677E4349743894951052325B393807879700DEF4CE9F7ED5AF6F93DA82D45B749B6C062396B712952DA2FEF8DD1C4602D1C48EBC39506CEB61F33DB92263A9650D290A8C128DC5A89042C9C6F6400400081E2390786035FDA5E9DB8EA8D39F5340B9B1012EBEDAA4'
    $JpgBin &= 'F6EC29D44865272A65412B490951DD0704646475A0D5ED9A7759CAD2965B16A14A24A4EA071FB8A82C6130DB75C75A4E0AD44A54B4B402413BA821247026821F5EE83BADD6FDA91E46976EE570B9BCC2ED37D329B47D589421090082A0B4EE2D2A5F802B7B7B8D06C5AAED1A92F5ABED64E9E8C9FAB6EACC9877D6E42125B88374BCD2904EF95AF0A4600DC2140E46283060C0D4971D622E1AB74BDFE7A58B92956F4A27444DBE1B6970869EEC83C16B584E1454A492093BA060507CBD691B8CBD7499D0B49310A50BE313957E6A702151D010168282ADF0A5A13B85013B87392682EAB486B487B508DA898BC45970E65D14E4DDD654DB8CC34B2E25A655F6B85A0150C009F6D5BE738C506D1A0ED73E1AAF773BB305BB85CEE8F3C415A5443083D9B09CA4918ECD0938E85473839A0DAA8140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A05028140A050283FFD9'
Return $JpgBin
EndFunc
Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites
davidkim

Try this:

;coded by UEZ build 2012-08-10 beta

#include <GDIPlus.au3>

_GDIPlus_Startup()
$sIn = StringReplace(@AutoItExe, "autoit3.exe", "ExamplesGUImsoobe.jpg")
$sOut = @ScriptDir & "Watermarked.jpg"

$r = _GDIPlus_WatermarkImage($sIn, $sOut, "Watermarked by UEZ", 170, 50, "Arial", 64, 45)

_GDIPlus_Shutdown()

If $r Then ShellExecute($sOut)
Exit

;======================================================================================
; Function Name:        _GDIPlus_WatermarkImage
; Description:              adds a text to an image
;
; Parameters:               $sBitmapFile: image file to load
;                                       $sSave: filename for saved image -> if no extension (jpg, bmp, png, gif, tif) is given the default is png image format
;                                       $sText: text string to draw onto the image
;                                       $iX: x position of the text on the image
;                                       $iY: y position of the text on the image
;                                       $sFontName: font name to use
;                                       $iFontSize: size of the font
; Optional:         $fAngle: angle of the text -> 0° - 359°
;                               $iFontColor: color of the text
;                                       $fAlpha: alpha channel of the text -> 0.0 (transparent) - 1.0 (opaque)
;                                       $iJPGQuality: JPG save quality -> 0 (worst) - 100 (best)
;
; Requirement(s):       GDIPlus.au3
; Return Value(s):      Success: 1
;               Error:
; Error codes:  1: image file to load not found
;               2: unable to create bitmap from loaded image
;               3: unable to save watermarked image
;
; Remark:                       don't forget to start _GDIPlus_Startup() / _GDIPlus_Shutdown()
;
; Author(s):        UEZ
; Version:      v0.99 Build 2012-08-10 Beta
;=======================================================================================
Func _GDIPlus_WatermarkImage($sBitmapFile, $sSave, $sText, $iX, $iY, $sFontName, $iFontSize, $fAngle = 0, $iFontColor = 0xFFFFFF, $fAlpha = 0.05, $iJPGQuality = 90)
    If Not FileExists($sBitmapFile) Then Return SetError(1, 0, 0)
    Local $hBitmap = _GDIPlus_BitmapCreateFromFile($sBitmapFile)
    If Not $hBitmap Then Return SetError(2, 0, 0)
    If $fAlpha < 0 Then $fAlpha = 0
    If $fAlpha > 1 Then $fAlpha = 1
    Local $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    Local $hBrush = _GDIPlus_BrushCreateSolid(BitShift(Int($fAlpha * 0xFF), -24) + $iFontColor)
Local $hFormat = _GDIPlus_StringFormatCreate()
Local $hFamily = _GDIPlus_FontFamilyCreate($sFontName)
Local $hFont = _GDIPlus_FontCreate($hFamily, $iFontSize, 0)
    Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
    Local $aMeasure = _GDIPlus_GraphicsMeasureString($hCtxt, $sText, $hFont, $tLayout, $hFormat)
    If Not $fAngle Then
        _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2)
        DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt, "int", 4)
        _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush)
    Else
        $fAngle = Mod($fAngle, 360)
        Local $iW = Int(DllStructGetData($aMeasure[0], "width") * 2), $iH = Int(DllStructGetData($aMeasure[0], "height") * 2), $iQ
        If $iW > $iH Then
            $iQ = $iW
        Else
            $iQ = $iH
        EndIf
        Local $hBitmap_Rot = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iQ, "int", $iQ, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0)
        $hBitmap_Rot = $hBitmap_Rot[6]
        Local $hCtxt_Rot = _GDIPlus_ImageGetGraphicsContext($hBitmap_Rot)
        _GDIPlus_GraphicsSetSmoothingMode($hCtxt_Rot, 2)
        DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hCtxt_Rot, "int", 4)
        Local $hMatrix = _GDIPlus_MatrixCreate()
        _GDIPlus_MatrixTranslate($hMatrix, $iQ / 2, $iQ / 2)
        _GDIPlus_MatrixRotate($hMatrix, $fAngle, False)
        _GDIPlus_MatrixTranslate($hMatrix, -$iQ / 2, -$iQ / 2)
        _GDIPlus_GraphicsSetTransform($hCtxt_Rot, $hMatrix)
        DllStructSetData($tLayout, "x", $iQ / 2)
        DllStructSetData($tLayout, "y", $iQ / 2)
        _GDIPlus_GraphicsDrawStringEx($hCtxt_Rot, $sText, $hFont, $tLayout, $hFormat, $hBrush)
        _GDIPlus_GraphicsDrawImageRect($hCtxt, $hBitmap_Rot, $iX - $iQ / 2, $iY - $iQ / 2, $iQ, $iQ)
        _GDIPlus_MatrixDispose($hMatrix)
        _GDIPlus_GraphicsDispose($hCtxt_Rot)
        _GDIPlus_BitmapDispose($hBitmap_Rot)
    EndIf
    Local $bRes
    If StringRight($sSave, 4) = ".jpg" Then
        Local Const $sCLSID = _GDIPlus_EncodersGetCLSID("JPG")
        Local $tParams = _GDIPlus_ParamInit(1)
        Local $tData = DllStructCreate("int Quality")
        If $iJPGQuality < 0 Then $iJPGQuality = 0
        If $iJPGQuality > 100 Then $iJPGQuality = 100
        DllStructSetData($tData, "Quality", $iJPGQuality)
        Local $pData = DllStructGetPtr($tData)
        _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData)
        Local Const $pParams = DllStructGetPtr($tParams)
        $bRes = _GDIPlus_ImageSaveToFileEx($hBitmap, $sSave, $sCLSID, $pParams)
        $tData = 0
        $tParams = 0
    Else
        StringRegExp($sSave, ".*.(gif|png|bmp|tif)", 1)
        If @error Then
            If StringRight($sSave, 1) = "." Then
                $sSave &= "png"
            Else
                $sSave &= ".png"
            EndIf
        EndIf
        $bRes = _GDIPlus_ImageSaveToFile($hBitmap, $sSave)
    EndIf
    Local $err
    If Not $bRes Then $err = 3
    _GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_BitmapDispose($hBitmap)
    $tLayout = 0
    If $err Then Return SetError($err, 0, 0)
    Return 1
EndFunc

Br,

UEZ

i was your script editing to

_GDIPlus_Startup()

$sIn=@ScriptDir&"desk_back.png"; StringReplace(@AutoItExe, "autoit3.exe", "ExamplesGUImsoobe.jpg")

$sOut=@ScriptDir&"Watermarked.png"

$r= _GDIPlus_WatermarkImage($sIn,$sOut,"AutoCool",110,350,"Arial",60,0,0x000000)

;~ $sBitmapFile, $sSave, $sText, $iX, $iY, $sFontName, $iFontSize, $fAngle = 0, $iFontColor = 0xFFFFFF, $fAlpha = 0.05, $iJPGQuality = 90)

_GDIPlus_Shutdown()

If$rThenShellExecute($sOut)

Exit

out put png is

Posted Image

i need png is

Posted Image

$iX , $iY,$iFontColor is Wrong behavior too.

how?


I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.

Share this post


Link to post
Share on other sites
UEZ

Thanks davidkim for reporting it. I update the code from post#4.

I forgot 2 lines for setting x and y position... :whistle:

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
ricky

Thanks UEZ for you code. It works very well...

I have two questions, it's possible the center the text on the image?

It's possible to detect if the test is too big for the image, cut the text and send to the next line?

Share this post


Link to post
Share on other sites
UEZ

More or less everything is possible! ;)

Currently I'm working to add the watermark feature to my screenshooter app where you can select the area on the screen where you want to place the text. When it is finished, can take some time because I'm very busy at the moment, I will update windows screenshooter.

Meanwhile I will modify the function to position the text on the bitmap selecting one of the 9 positions. Regarding the line break I have to think about some possible scenarios how to implement it properly. If the text is in the center it is ok but for the buttom possition it can be a problem...

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
UEZ

@ricky03: I update the code from post Please try again and post your results.

Thanks,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
ricky

It works very well, but I have more one question, it's possible to add a position 10

And with this position, the Y position is used but the text is centered, it's possible?

I have a warning, because $iDeltaPos is not used!

Share this post


Link to post
Share on other sites
UEZ

The line with $iDeltaPos (81) can be deleted (I forgot it).

Regarding your 2nd request: of course it is possible but consider all possibilities will go beyond the scope.

Let me think about how to implement it without production too much code.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
UEZ

@JScript: you are welcome! :)

@ricky03: I added two parameters $iAdjX and $iAdjY where you can adjust the x respectively y position of the text!

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
bartekd

whenever I watermark an image, the watermark is always dark grey for some reason. I tried changing the color to a lot of different ones. Any ideas?

Share this post


Link to post
Share on other sites
UEZ

whenever I watermark an image, the watermark is always dark grey for some reason. I tried changing the color to a lot of different ones. Any ideas?

You mean the font? Which code did you used? The one from post#4?

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
bartekd

Yes, I am sending the code from post 4. When the image opens, it is always really faint and its a grey color.

Share this post


Link to post
Share on other sites
UEZ

Can you post the created image?

Is it working with this: http://www.autoitscript.com/forum/index.php?showtopic=145873 ?

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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

  • Similar Content

    • UEZ
      By UEZ
      Here a little tool to display the histogram of an image (inspired by this thread):
      )

      ;#AutoIt3Wrapper_Icon=Histogram1.ico #AutoIt3Wrapper_Compile_Both=y ;#AutoIt3Wrapper_Res_Field=CompanyName|UEZ Software Development ;#AutoIt3Wrapper_Res_Field=ProductName|GDI+ Show Histogram ;#AutoIt3Wrapper_Res_Field=ProductVersion|%AutoItVer% #AutoIt3Wrapper_Res_Fileversion=0.9.8.0 ;#AutoIt3Wrapper_Res_Field=Build|2015-07-10 #AutoIt3Wrapper_Res_LegalCopyright=UEZ Software Development #AutoIt3Wrapper_Res_Language=1033 ;#AutoIt3Wrapper_Res_Field=URL|http://www.autoitscript.com/forum/index.php?showtopic=147777 #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe /rm #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UPX_Parameters=--best --lzma #AutoIt3Wrapper_Run_After=upx.exe --best --lzma "GDI+ Show Histogram_x64.exe" #AutoIt3Wrapper_UseX64=n #include <Constants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", 1) Opt("MouseCoordMode", 2) _GDIPlus_Startup() If @error Then Exit MsgBox(0x40010, "Error", "GDI+ Show Histogram can run on operating systems Vista or newer only!") Global $ghGDIPDll = $__g_hGDIPDll, $aRes Global Const $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]") Global Const $aFullScreen = WinGetPos($hFullScreen) Global Enum $HistogramFormatARGB, $HistogramFormatPARGB, $HistogramFormatRGB, $HistogramFormatGray, _ ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms534129(v=vs.85).aspx $HistogramFormatB, $HistogramFormatG, $HistogramFormatR, $HistogramFormatA Global $tStructChannel0 = DllStructCreate("uint channel0[256]") Global $pStructChannel0 = DllStructGetPtr($tStructChannel0) Global $tStructChannel1 = DllStructCreate("uint channel1[256]") Global $pStructChannel1 = DllStructGetPtr($tStructChannel1) Global $tStructChannel2 = DllStructCreate("uint channel2[256]") Global $pStructChannel2 = DllStructGetPtr($tStructChannel2) Global $tStructChannel3 = DllStructCreate("uint channel3[256]") Global $pStructChannel3 = DllStructGetPtr($tStructChannel3) Global $s, $sFile, $hImage, $bImgLoaded = False, $aLuminosity[257], $aCRGB[257] Global Const $STM_SETIMAGE = 0x0172, $iLineJoinBevel = 1, $frY = 0.299, $fgY = 0.587, $fbY = 0.114 Global Const $hGUI = GUICreate("GDI+ Show Histogram v0.98 beta by UEZ build 2015-07-13", 468, 310, -1, -1, Default, Default) GUISetBkColor(0xFFFFFF, $hGUI) Global Const $sLabel_Titel_Txt = "GDI+ Show Histogram" Global Const $iPosX_Label = 20, $iPosY_Label = 12 Global Const $iLabel_Titel_Shadow = GUICtrlCreateLabel($sLabel_Titel_Txt, $iPosX_Label, $iPosY_Label, 429, 57) GUICtrlSetFont(-1, 30, 400, 0, "Comic Sans MS", 4) GUICtrlSetColor(-1, 0xC0C0D8) Global Const $iLabel_Titel = GUICtrlCreateLabel($sLabel_Titel_Txt, $iPosX_Label - 4, $iPosY_Label - 4, 429, 57) GUICtrlSetFont(-1, 30, 400, 0, "Comic Sans MS", 4) GUICtrlSetColor(-1, 0x0000C0) GUICtrlSetBkColor(-1, -2) Global Const $iPic_Histogram = GUICtrlCreatePic("", 20, 90, 255, 127, -1, $WS_EX_STATICEDGE) GUICtrlSetCursor(-1, 14) Global Const $iPic_ColorGradient = GUICtrlCreatePic("", 20, 220, 255, 24, -1, $WS_EX_STATICEDGE) Global Const $iGroup = GUICtrlCreateGroup("Channel", 290, 84, 160, 164) Global Const $iRadio_L = GUICtrlCreateRadio("Luminosit&y (gray)", 300, 100, 110, 20) GUICtrlSetTip(-1, $frY & "*R, " & $fgY & "*G, " & $fbY & "*B") GUICtrlSetState($iRadio_L, $GUI_CHECKED) Global Const $iRadio_C = GUICtrlCreateRadio("&cRGB", 300, 130, 60, 20) GUICtrlSetTip(-1, "Combined average of RGB values") Global Const $iRadio_R = GUICtrlCreateRadio("&Red", 300, 160, 60, 20) Global Const $iRadio_G = GUICtrlCreateRadio("&Green", 300, 190, 60, 20) Global Const $iRadio_B = GUICtrlCreateRadio("&Blue", 300, 220, 60, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) Global Const $iButton_Save = GUICtrlCreateButton("&Save", 209, 265, 70, 30) GUICtrlSetTip(-1, "Click button to save all histogram images") GUICtrlSetState(-1, $GUI_DISABLE) Global Const $iButton_Load = GUICtrlCreateButton("&Load", 290, 265, 70, 30) GUICtrlSetTip(-1, "Click button to load an image") Global Const $iButton_Exit = GUICtrlCreateButton("E&xit", 390, 265, 60, 30) Global $sLabelCredit_Txt = "coded by UEZ'13" Global $aLabelCredit_Pos[StringLen($sLabelCredit_Txt)][4], $u, $iFS = 6.5, $iY = 280 For $u = 0 To UBound($aLabelCredit_Pos) - 1 $aLabelCredit_Pos[$u][0] = StringMid($sLabelCredit_Txt, $u + 1, 1) $aLabelCredit_Pos[$u][1] = 20 + $u * ($iFS - 0.25) $aLabelCredit_Pos[$u][2] = $iY $aLabelCredit_Pos[$u][3] = GUICtrlCreateLabel($aLabelCredit_Pos[$u][0], $aLabelCredit_Pos[$u][1], $aLabelCredit_Pos[$u][2], $iFS, $iFS * 1.8) GUICtrlSetFont(-1, $iFS, 400, 0, "Comic Sans MS", 2) GUICtrlSetColor(-1, 0x006000) Next Global $aLabelCredit_AnimPos[300] For $u = 0 To UBound($aLabelCredit_AnimPos) - 1 $aLabelCredit_AnimPos[$u] = $iY Next Global Const $fLimes = 2.2, $fStep = 0.1 Global $iPT = 0, $z = Int((UBound($aLabelCredit_AnimPos) - ($fLimes * $fStep * 100)) / 2) For $u = 0 To $fLimes Step $fStep $aLabelCredit_AnimPos[$z] = $iY + Sin($iPT * 4) * 10 $z += 1 $iPT += 0.075 Next Global $ihGui_PreviewSize = 256, $iBGColor = 0xF0F0F0 Global $hGui_Preview = GUICreate("", $ihGui_PreviewSize, $ihGui_PreviewSize + 58, -1, -1, $WS_POPUP + $WS_BORDER, $WS_EX_TOPMOST, $hGUI) Global $iPic_Preview = GUICtrlCreatePic("", 0, 0, $ihGui_PreviewSize, $ihGui_PreviewSize) Global $idLabel_Info = GUICtrlCreateLabel("", 0, $ihGui_PreviewSize, $ihGui_PreviewSize * 2, 58) GUICtrlSetFont(-1, 8.5, 400, 0, "Arial", 5) GUICtrlSetColor(-1, $iBGColor) GUICtrlSetBkColor(-1, 0x333333) Global Const $hTexture_Checkerboard = _GDIPlus_CreateCheckerboardTexture(8, 0xFFFBFBFB, 0xFFFFFFFF) Global $hHBmp_L = _GDIPlus_CreateColorGradient("L", 256, 24) Global $hHBmp_C = _GDIPlus_CreateColorGradient("C", 256, 24) Global $hHBmp_R = _GDIPlus_CreateColorGradient("R", 256, 24) Global $hHBmp_G = _GDIPlus_CreateColorGradient("G", 256, 24) Global $hHBmp_B = _GDIPlus_CreateColorGradient("B", 256, 24) Global Const $hHBmp_HL = _GDIPlus_BitmapCreateFromScan0(256, 127) Global Const $hCtxt_HL = _GDIPlus_ImageGetGraphicsContext($hHBmp_HL) Global Const $hHBmp_HC = _GDIPlus_BitmapCloneArea($hHBmp_HL, 0, 0, 256, 127, 0x0026200A) Global Const $hCtxt_HC = _GDIPlus_ImageGetGraphicsContext($hHBmp_HC) Global Const $hHBmp_HR = _GDIPlus_BitmapCloneArea($hHBmp_HL, 0, 0, 256, 127, 0x0026200A) Global Const $hCtxt_HR = _GDIPlus_ImageGetGraphicsContext($hHBmp_HR) Global Const $hHBmp_HG = _GDIPlus_BitmapCloneArea($hHBmp_HL, 0, 0, 256, 127, 0x0026200A) Global Const $hCtxt_HG = _GDIPlus_ImageGetGraphicsContext($hHBmp_HG) Global Const $hHBmp_HB = _GDIPlus_BitmapCloneArea($hHBmp_HL, 0, 0, 256, 127, 0x0026200A) Global Const $hCtxt_HB = _GDIPlus_ImageGetGraphicsContext($hHBmp_HB) _GDIPlus_GraphicsClear($hCtxt_HL, 0xFFFFFFFF) _hBmpToPicControl($iPic_ColorGradient, $hHBmp_L) Global $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HL) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) GUISetState(@SW_HIDE, $hGui_Preview) GUISetState(@SW_SHOW, $hGUI) ControlFocus($hGUI, "", $iButton_Load) Global $hPen_H = _GDIPlus_PenCreate() $s = "L" Global $iDummyL = GUICtrlCreateDummy(), $iDummyC = GUICtrlCreateDummy(), $iDummyR = GUICtrlCreateDummy(), $iDummyG = GUICtrlCreateDummy(), $iDummyB = GUICtrlCreateDummy() Global $iHistogramFormat, $hHBmp_Preview, $aPosCtrl, $aPosWin, $aMouseInfo, $aPos_hWnd, $imp, $iVal, $iMpos_oldx, $iMpos_oldy, $sType, $iPaletteType, $iPixelFormat Global $fAverage_L, $fAverage_cRGB, $iAverage_R, $iAverage_B, $iAverage_G, $o = 0 Global $bShow = False, $bHide = False, $bIsAlpha = False, $bIsGray = False Global Const $iEntries = 256 Global Const $tagCOLORPALETTE = "uint Flags;" & _ ; Palette flags "uint Count;" & _ ; Number of color entries "uint ARGB[" & $iEntries & "];" ; Palette color AdlibRegister("AnimateLabel", 60) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iButton_Exit AdlibUnRegister("AnimateLabel") GUIDelete($hGui_Preview) GUIDelete($hGUI) _WinAPI_DeleteObject($hHBmp_L) _WinAPI_DeleteObject($hHBmp_C) _WinAPI_DeleteObject($hHBmp_L) _WinAPI_DeleteObject($hHBmp_R) _WinAPI_DeleteObject($hHBmp_G) _WinAPI_DeleteObject($hHBmp_B) If $hHBmp_Preview Then _WinAPI_DeleteObject($hHBmp_Preview) _GDIPlus_PenDispose($hPen_H) _GDIPlus_BrushDispose($hTexture_Checkerboard) _GDIPlus_GraphicsDispose($hCtxt_HL) _GDIPlus_GraphicsDispose($hCtxt_HC) _GDIPlus_GraphicsDispose($hCtxt_HR) _GDIPlus_GraphicsDispose($hCtxt_HG) _GDIPlus_GraphicsDispose($hCtxt_HB) _GDIPlus_BitmapDispose($hHBmp_HL) _GDIPlus_BitmapDispose($hHBmp_HC) _GDIPlus_BitmapDispose($hHBmp_HR) _GDIPlus_BitmapDispose($hHBmp_HG) _GDIPlus_BitmapDispose($hHBmp_HB) _GDIPlus_Shutdown() $tStructChannel0 = 0 $tStructChannel1 = 0 $tStructChannel2 = 0 $tStructChannel3 = 0 Exit Case $iRadio_L, $iDummyL If $s <> "L" Then _hBmpToPicControl($iPic_ColorGradient, $hHBmp_L) If $bImgLoaded Then $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HL) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) EndIf $s = "L" EndIf Case $iRadio_C, $iDummyC If $s <> "C" Then _hBmpToPicControl($iPic_ColorGradient, $hHBmp_C) If $bImgLoaded Then $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HC) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) EndIf $s = "C" EndIf Case $iRadio_R, $iDummyR If $s <> "R" Then _hBmpToPicControl($iPic_ColorGradient, $hHBmp_R) If $bImgLoaded Then $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HR) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) EndIf $s = "R" EndIf Case $iRadio_G, $iDummyG If $s <> "G" Then _hBmpToPicControl($iPic_ColorGradient, $hHBmp_G) If $bImgLoaded Then $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HG) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) EndIf $s = "G" EndIf Case $iRadio_B, $iDummyB If $s <> "B" Then _hBmpToPicControl($iPic_ColorGradient, $hHBmp_B) If $bImgLoaded Then $hB_H = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBmp_HB) _hBmpToPicControl($iPic_Histogram, $hB_H, 1) EndIf $s = "B" EndIf Case $iButton_Load $sFile = FileOpenDialog("Select an image", "", "Images (*.jpg;*.png;*.bmp;*.gif)", 3) If @error Then ContinueCase If $bImgLoaded Then _GDIPlus_ImageDispose($hImage) $hImage = _GDIPlus_ImageLoadFromFile($sFile) If @error Then MsgBox(0x40010, "Error", "Unable to load image", 30) ContinueCase EndIf GUICtrlSetState($iButton_Save, $GUI_ENABLE) $aRes = _GDIPlus_ImageGetFlags($hImage) If BitAND($aRes[0], $GDIP_IMAGEFLAGS_HASALPHA) Then $bIsAlpha = True Else $bIsAlpha = False EndIf If BitAND($aRes[0], $GDIP_IMAGEFLAGS_COLORSPACE_GRAY) Then $bIsGray = True Else $bIsGray = False EndIf $hHBmp_Preview = _GetImage($sFile, $ihGui_PreviewSize, $iBGColor) _hBmpToPicControl($iPic_Preview, $hHBmp_Preview, 1) If Not $bIsAlpha Then $pStructChannel3 = 0 $iHistogramFormat = $HistogramFormatRGB Else $pStructChannel3 = DllStructGetPtr($tStructChannel3) $iHistogramFormat = $HistogramFormatARGB EndIf _GDIPlus_BitmapGetHistogram($hImage, $iHistogramFormat, _GDIPlus_BitmapGetHistogramSize($iHistogramFormat), $pStructChannel0, $pStructChannel1, $pStructChannel2, $pStructChannel3) _GDIPlus_CreateHistogram() $bImgLoaded = True If BitAND(GUICtrlRead($iRadio_L), $GUI_CHECKED) Then $s = "" GUICtrlSendToDummy($iDummyL) ElseIf BitAND(GUICtrlRead($iRadio_C), $GUI_CHECKED) Then $s = "" GUICtrlSendToDummy($iDummyC) ElseIf BitAND(GUICtrlRead($iRadio_R), $GUI_CHECKED) Then $s = "" GUICtrlSendToDummy($iDummyR) ElseIf BitAND(GUICtrlRead($iRadio_G), $GUI_CHECKED) Then $s = "" GUICtrlSendToDummy($iDummyG) Else $s = "" GUICtrlSendToDummy($iDummyB) EndIf Case $iButton_Save If $sFile = "" Then ContinueLoop $sType = "png" $o += _GDIPlus_ImageSaveToFile($hHBmp_HL, StringRegExpReplace($sFile, "(.*)\..*", "$1") & "_Luminosity." & $sType) $o += _GDIPlus_ImageSaveToFile($hHBmp_HC, StringRegExpReplace($sFile, "(.*)\..*", "$1") & "_cRGB." & $sType) $o += _GDIPlus_ImageSaveToFile($hHBmp_HR, StringRegExpReplace($sFile, "(.*)\..*", "$1") & "_Red." & $sType) $o += _GDIPlus_ImageSaveToFile($hHBmp_HG, StringRegExpReplace($sFile, "(.*)\..*", "$1") & "_Green." & $sType) $o += _GDIPlus_ImageSaveToFile($hHBmp_HB, StringRegExpReplace($sFile, "(.*)\..*", "$1") & "_Blue." & $sType) If $o = 5 Then MsgBox(64 + 262144, "Information", "Images properly saved to " & StringRegExpReplace($sFile, "(.*)\\.*", "$1"), 30, $hGUI) Else MsgBox(16 + 262144, "Error", "One or more images could not saved to " & StringRegExpReplace($sFile, "(.*)\\.*", "$1") & ".", 30, $hGUI) EndIf EndSwitch If WinActive($hGUI) Then $aMouseInfo = GUIGetCursorInfo($hGUI) Switch $aMouseInfo[4] Case $iPic_Histogram If $bImgLoaded Then $aPos_hWnd = WinGetPos($hGUI) $imp = Max(1, Min(256, -19 + $aMouseInfo[0])) Switch $s Case "L" $iVal = $aLuminosity[$imp] Case "C" $iVal = $aCRGB[$imp] Case "R" $iVal = DllStructGetData($tStructChannel0, "channel0", $imp) Case "G" $iVal = DllStructGetData($tStructChannel1, "channel1", $imp) Case "B" $iVal = DllStructGetData($tStructChannel2, "channel2", $imp) EndSwitch If $iMpos_oldx <> $aMouseInfo[0] Or $iMpos_oldy <> $aMouseInfo[1] Then ToolTip("Index: " & $imp & ", Value: " & Round($iVal, 0) & ", Average: " & Round($fAverage_L, 2), $aPos_hWnd[0] + $aMouseInfo[0] - 60, $aMouseInfo[1] + $aPos_hWnd[1] - 20) $iMpos_oldx = $aMouseInfo[0] $iMpos_oldy = $aMouseInfo[1] EndIf ShowPreview($iPic_Histogram) $bShow = True $bHide = False EndIf Case Else If Not $bHide Then GUISetState(@SW_HIDE, $hGui_Preview) $bHide = True ToolTip("") EndIf $bShow = False EndSwitch EndIf WEnd Func AnimateLabel() Local Static $v = Int((UBound($aLabelCredit_AnimPos) - ($fLimes * $fStep * 100)) / 2) Local $u For $u = 0 To UBound($aLabelCredit_Pos) - 1 GUICtrlSetPos($aLabelCredit_Pos[$u][3], $aLabelCredit_Pos[$u][1], $aLabelCredit_AnimPos[$v - $u]) Next If $v - $u < 0 Then $v = UBound($aLabelCredit_AnimPos) - 1 $v -= 1 EndFunc ;==>AnimateLabel Func Min($a, $b) If $a < $b Then Return $a Return $b EndFunc ;==>Min Func Max($a, $b) If $a > $b Then Return $a Return $b EndFunc ;==>Max Func ShowPreview($iCtrl) $aPosWin = WinGetPos($hGUI) $aPosCtrl = ControlGetPos($hGUI, "", $iCtrl) Local $iNewX, $iNewX1 = $aPosWin[0] - $ihGui_PreviewSize + 10, $iNewX2 = $aPosWin[0] + $aPosWin[2] - 10 $iNewX = $iNewX1 If $iNewX1 < $aFullScreen[0] Then $iNewX = $iNewX2 EndIf WinMove($hGui_Preview, "", $iNewX, $aPosWin[1] + 50) GUISetState(@SW_SHOWNOACTIVATE, $hGui_Preview) EndFunc ;==>ShowPreview Func _GetImage($sFile, $iWH, $iBkClr = 0xFFFFFF, $bCheckerboard_Bg = True) Local $hBmp1, $hBitmap, $hGraphic, $hImage, $iW, $iH, $aGS, $hBmp2, $aFTS $aFTS = FileGetTime($sFile) If @error Then Return SetError(1, 0, 0) $hBmp1 = _WinAPI_CreateBitmap($iWH, $iWH, 1, 32) $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp1) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap) _WinAPI_DeleteObject($hBmp1) $hImage = _GDIPlus_ImageLoadFromFile($sFile) $iW = _GDIPlus_ImageGetWidth($hImage) $iH = _GDIPlus_ImageGetHeight($hImage) GUICtrlSetData($idLabel_Info, StringRegExpReplace($sFile, ".*\\(.*)", "$1") & @LF & Round(FileGetSize($sFile) / 1024, 0) & " kb (" & $iW & " x " & $iH & ")" & @LF & $aFTS[0] & "/" & $aFTS[1] & "/" & $aFTS[2] & " " & $aFTS[3] & ":" & $aFTS[4] & ":" & $aFTS[5] & @LF & "Alpha: " & $bIsAlpha & ", Gray: " & $bIsGray) $aGS = _GetScale($iW, $iH, $iWH) Switch $bCheckerboard_Bg Case True ;~ _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWH, $iWH, $hTexture_Checkerboard) _GDIPlus_GraphicsClear($hGraphic, BitOR(0xFF000000, $iBkClr)) _GDIPlus_GraphicsFillRect($hGraphic, $aGS[0], $aGS[1], $aGS[2], $aGS[3], $hTexture_Checkerboard) Case False _GDIPlus_GraphicsClear($hGraphic, BitOR(0xFF000000, $iBkClr)) EndSwitch _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, $aGS[0], $aGS[1], $aGS[2], $aGS[3]) _GDIPlus_ImageDispose($hImage) _GDIPlus_GraphicsDispose($hGraphic) $hBmp2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hBmp2 EndFunc ;==>_GetImage Func _GetScale($iW, $iH, $iWH) Local $aRet[4] If $iW <= $iWH And $iH <= $iWH Then $aRet[2] = $iW $aRet[3] = $iH $aRet[0] = ($iWH - $aRet[2]) / 2 $aRet[1] = ($iWH - $aRet[3]) / 2 ElseIf $iW > $iH Then $aRet[2] = $iWH $aRet[3] = $iH / ($iW / $iWH) $aRet[0] = 0 $aRet[1] = ($iWH - $aRet[3]) / 2 ElseIf $iW < $iH Then $aRet[2] = $iW / ($iH / $iWH) $aRet[3] = $iWH $aRet[0] = ($iWH - $aRet[2]) / 2 $aRet[1] = 0 ElseIf $iW = $iH Then $aRet[2] = $iWH $aRet[3] = $iWH $aRet[0] = 0 $aRet[1] = 0 EndIf Return $aRet EndFunc ;==>_GetScale Func _hBmpToPicControl($iCID, ByRef $hBmp, $iFlag = 0) Local $hOldBmp $hOldBmp = GUICtrlSendMsg($iCID, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp) If $hOldBmp Then _WinAPI_DeleteObject($hOldBmp) If $iFlag Then _WinAPI_DeleteObject($hBmp) EndFunc ;==>_hBmpToPicControl Func _GDIPlus_CreateHistogram($sRounding = "Ceiling") Local $iMaxL, $iMaxC, $iMaxR, $iMaxG, $iMaxB, $a, $r, $g, $b, $yR, $yG, $yB, $iRedAv, $iGreenAv, $iBlueAv For $i = 1 + $bIsAlpha To 256 If $bIsAlpha Then ;~ ConsoleWrite("Alpha: " & DllStructGetData($tStructChannel0, "channel0", $i) & @CRLF) $r = DllStructGetData($tStructChannel1, "channel1", $i) $yR = $r * $frY If DllStructGetData($tStructChannel1 , "channel1", $i) > $iMaxR Then $iMaxR = $r $g = DllStructGetData($tStructChannel2, "channel2", $i) $yG = $g * $fgY If DllStructGetData($tStructChannel2 , "channel2", $i) > $iMaxG Then $iMaxG = $g $b = DllStructGetData($tStructChannel3, "channel3", $i) $yB = $b * $fbY If DllStructGetData($tStructChannel3 , "channel3", $i) > $iMaxB Then $iMaxB = $b $fAverage_cRGB += $r + $g + $b $fAverage_L += $yR + $yG + $yB Else $r = DllStructGetData($tStructChannel0, "channel0", $i) $yR = $r * $frY If DllStructGetData($tStructChannel0 , "channel0", $i) > $iMaxR Then $iMaxR = $r $g = DllStructGetData($tStructChannel1, "channel1", $i) $yG = $g * $fgY If DllStructGetData($tStructChannel1 , "channel1", $i) > $iMaxG Then $iMaxG = $g $b = DllStructGetData($tStructChannel2, "channel2", $i) $yB = $b * $fbY If DllStructGetData($tStructChannel2 , "channel2", $i) > $iMaxB Then $iMaxB = $b EndIf $fAverage_cRGB += $r + $g + $b $fAverage_L += $yR + $yG + $yB $aLuminosity[$i] = $yR + $yG + $yB If $aLuminosity[$i] > $iMaxL Then $iMaxL = $aLuminosity[$i] $aCRGB[$i] = ($r + $g + $b) / 3 If $aCRGB[$i] > $iMaxC Then $iMaxC = $aCRGB[$i] Next $fAverage_cRGB /= 256 * 3 $fAverage_L /= 256 _GDIPlus_GraphicsClear($hCtxt_HL, 0xFFFFFFFF) _GDIPlus_GraphicsClear($hCtxt_HC, 0xFFFFFFFF) _GDIPlus_GraphicsClear($hCtxt_HR, 0xFFFFFFFF) _GDIPlus_GraphicsClear($hCtxt_HG, 0xFFFFFFFF) _GDIPlus_GraphicsClear($hCtxt_HB, 0xFFFFFFFF) Local $iDL = 1, $iDC = 1, $iDR = 1, $iDG = 1, $iDB = 1 Local $sRoundings = "Round,Ceiling,Floor," If Not StringInStr($sRoundings, $sRounding) Then $sRounding = "Ceiling" If $iMaxL > 128 Then ;~ $iDL = Ceiling($iMaxL / 128) $iDL = Execute($sRounding & "(" & $iMaxL / 128 & ")") Else $iDL = 1 / (128 / $iMaxL) EndIf If $iMaxC > 128 Then ;~ $iDC = Ceiling($iMaxC / 128) $iDC = Execute($sRounding & "(" & $iMaxC / 128 & ")") Else $iDC = 1 / (128 / $iMaxC) EndIf If $iMaxR > 128 Then ;~ $iDR = Ceiling($iMaxR / 128) $iDR = Execute($sRounding & "(" & $iMaxR / 128 & ")") Else $iDR = 1 / (128 / $iMaxR) EndIf If $iMaxG > 128 Then ;~ $iDG = Ceiling($iMaxG / 128) $iDG = Execute($sRounding & "(" & $iMaxG / 128 & ")") Else $iDG = 1 / (128 / $iMaxG) EndIf If $iMaxB > 128 Then ;~ $iDB = Ceiling($iMaxB / 128) $iDB = Execute($sRounding & "(" & $iMaxB / 128 & ")") Else $iDB = 1 / (128 / $iMaxB) EndIf For $i = 1 To 256 _GDIPlus_PenSetColor($hPen_H, 0xFF000000) _GDIPlus_GraphicsDrawLine($hCtxt_HL, $i - 1, 127, $i - 1, 127 - (Int($aLuminosity[$i] / $iDL)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFF000000) _GDIPlus_GraphicsDrawLine($hCtxt_HC, $i - 1, 127, $i - 1, 127 - (Int($aCRGB[$i] / $iDC)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFFB00000) If $bIsAlpha Then _GDIPlus_GraphicsDrawLine($hCtxt_HR, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel1, "channel1", $i) / $iDR)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFF00B000) _GDIPlus_GraphicsDrawLine($hCtxt_HG, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel2, "channel2", $i) / $iDG)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFF0000B0) _GDIPlus_GraphicsDrawLine($hCtxt_HB, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel3, "channel3", $i) / $iDB)), $hPen_H) Else _GDIPlus_GraphicsDrawLine($hCtxt_HR, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel0, "channel0", $i) / $iDR)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFF00B000) _GDIPlus_GraphicsDrawLine($hCtxt_HG, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel1, "channel1", $i) / $iDG)), $hPen_H) _GDIPlus_PenSetColor($hPen_H, 0xFF0000B0) _GDIPlus_GraphicsDrawLine($hCtxt_HB, $i - 1, 127, $i - 1, 127 - (Int(DllStructGetData($tStructChannel2, "channel2", $i) / $iDB)), $hPen_H) EndIf Next EndFunc ;==>_GDIPlus_CreateHistogram Func _GDIPlus_CreateColorGradient($sColorChannel, $iW, $iH, $bHBitmap = True) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) ;~ _GDIPlus_GraphicsSetSmoothingMode($hCtxt, 2) Local $hPen = _GDIPlus_PenCreate() _GDIPlus_PenSetLineJoin($hPen, $iLineJoinBevel) Local $i, $c For $i = 0 To $iW $c = Hex($i, 2) Switch $sColorChannel Case "L" _GDIPlus_PenSetColor($hPen, "0xFF" & $c & $c & $c) Case "C" _GDIPlus_PenSetColor($hPen, "0xFF" & $c & $c & $c) Case "R" _GDIPlus_PenSetColor($hPen, "0xFF" & $c & "0000") Case "G" _GDIPlus_PenSetColor($hPen, "0xFF00" & $c & "00") Case "B" _GDIPlus_PenSetColor($hPen, "0xFF0000" & $c) EndSwitch _GDIPlus_GraphicsDrawLine($hCtxt, $i, 0, $i, $iH, $hPen) Next _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_PenDispose($hPen) If $bHBitmap Then Local $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) Return $hHBmp EndIf Return $hBitmap EndFunc ;==>_GDIPlus_CreateColorGradient Func _GDIPlus_CreateCheckerboardTexture($iSquareSize = 80, $iCol1 = 0xFFECECEC, $iCol2 = 0xFFDFDFDF) Local $hPatternBitmap = _GDIPlus_BitmapCreateFromScan0(2 * $iSquareSize, 2 * $iSquareSize) Local $hCtxt = _GDIPlus_ImageGetGraphicsContext($hPatternBitmap) Local $hBrush0 = _GDIPlus_BrushCreateSolid($iCol1) Local $hBrush1 = _GDIPlus_BrushCreateSolid($iCol2) _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $iSquareSize, $iSquareSize, $hBrush0) _GDIPlus_GraphicsFillRect($hCtxt, $iSquareSize, 0, $iSquareSize, $iSquareSize, $hBrush1) _GDIPlus_GraphicsFillRect($hCtxt, 0, $iSquareSize, $iSquareSize, $iSquareSize, $hBrush1) _GDIPlus_GraphicsFillRect($hCtxt, $iSquareSize, $iSquareSize, $iSquareSize, $iSquareSize, $hBrush0) Local $hTexture = _GDIPlus_TextureCreate($hPatternBitmap) _GDIPlus_GraphicsDispose($hCtxt) _GDIPlus_BitmapDispose($hPatternBitmap) _GDIPlus_BitmapDispose($hBrush0) _GDIPlus_BitmapDispose($hBrush1) Return $hTexture EndFunc ;==>_CreatePatternTexture  
      GdipBitmapGetHistogram(), GdipBitmapGetHistogramSize() and 2 more GDI+ functions requires GDI+ v1.1 which means this will only run on Vista or higher operating systems.
      I hope the values are correct especially the value for luminosity.
      Br,
      UEZ
    • UEZ
      By UEZ
      AutoIt Windows Screenshooter
      Key Features:
      takes easily a screenshot from any visible window capture any region of the desktop incl. freehand capturing capture GUI controls and GUI menus separately capture a marked area every x seconds for a duration of y seconds create a GIF animation from saved frames (Vista or higher os required) capture to AVI file (without audio!) takes a screenshot from web sites (available only on Win7+ os and when Aero is enabled) put images to clipboard to paste to other applications easily color picker save image in different formats and also to PDF! add timestamp to saved images simple image editing options: greyscale, b&w, invert, rotate +-90° send image to printer and default email client preview of captured screens incl. zoom option multi monitor support display pixel color under mouse ruler basic image editor (paint, highlight, ellipse, rectangle, text and some graphic FX) watermark captured image no 3rd party tools or DLLs used - pure AutoIt! fully portable - no installation is needed multi language feature (Eng, Ger, Tur, Fra and Rus only) To do:
      capture content of scrollable window/control capture cascaded menus Due to DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) limitation some windows cannot be captured properly (GDI+, ProgDVB, etc.) but can take screenshots of hidden windows. One workaround is to use full screen capturing (F11/F12) or "Grab Screen" function! Or try double click with rmb on listview items (beta).
      Download source code (7339 downloads previously): AutoIt Windows Screenshooter v1.82 Build 2018-12-13.7z (version 3.3.12.0+ needed!)
      You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name!
      Download compiled Exe only: 4shared / Media Fire  / Softpedia (1.54mb)
      Distributing copies of the program in compiled format (exe) must be free of any fee!
      -----> click here to Donate!  
       
      (Current donators: 1. Cuong N.) 
      It is designed for Win7+ operating systems with AERO enabled! E.g. on WinXP machines some functions are not working properly and might crash the application!
      AV scanners may have a negative impact the execution of compiled exe and might report any malware. I guarantee that there is no malicious code in the source code / exe!!! 
      Main GUI:

       
       
      About Intro:

       
       
      Basic Image Editor:

       
       
      Watermark:

       
       
      Click link for an enhanced version of Watermark Image.
      Credits:
      main code by UEZ additional code (alphabetical order) by Authenticity, AutoItObject Team, Eemuli, Eukalyptus, funkey, _Kurt, martin, monoceres, ProgAndy, taietel, trancexx, Ward, wolf9228 and Yashied! mesale0077 for turkish translation wakillon for french translation AZJIO for russian translation Keys:
      Main GUI:
      User your mouse to scroll preview window or
      Numpad 8: Scroll preview window up
      Numpad 2: Scroll preview window down
      Numpad 4: Scroll preview window left
      Numpad 6: Scroll preview window right
      Numpad +: zoom in preview window or mouse wheel down
      Numpad -: zoom out preview window or mouse wheel up
      F1: capture again on last position
      F5: refresh Windows Name list
      PRINTSCREEN: take screenshot from whole screen
      ALT+PRINTSCR: take a screenshot from active window
      F10: Undo made changes with Image Editing function
      F11: take screenshot from whole screen incl mouse cursor
      F12: take screenshot from whole screen
      Ctrl+Alt+F9 start "Grab Screen" mode
      Ctrl+Alt+F12: take a screenshot from active window using alternative screenshot functionality (beta)!
      Ctrl+r: call ruler
      Ctrl+s: save current displayed image
      Ctrl+x: exit program
      ctrl+w: call web grab input field (available only when Aero is enabled)
      Ctrl+i: call image editor
      Ctrl+m: call watermark editor
      Ctrl+z: undo
      Only available on Vista+ os: double click with rmb on list items to use alternative screenshot functionality (beta)!
      When 'Grab Screen' is clicked you can hold down the ctrl key to switch to 'grab controls' mode. Control under mouse will be framed red.
      ctrl + shift will take the screenshot of appropriate control. To capture GUI menus you can press rmb which simulates the lmb. When a menu is opened press shift additionally to capture it.
      Press and hold only the shift key to capture any region on the desktop using freehand capturing - release it so capture marked regions!
      Or just mark resize able area which you want to grab. Press CTRL key to grab marked area or right mouse button to capture the marked area every x seconds for a duration of y seconds.
      When saving the image just enter the extension you wish to use (*.jpg;*.png;*.bmp;*.gif;*.tif;*.pdf). Big thanks to taietel for his PDF UDF!
      Image Editor:
      s: save
      c: copy
      n: send
      h: highlighter
      p: pen
      r: rectangle
      e: ellipse
      a: arrow
      o: color
      t: text
      g: text config
      Ctrl+z: undo
      Watermark editor:
      Ctrl+z: undo
       
      To start the app minimized just call it "Windows Screenshooter.exe /min"
      Maybe it is useful for someone...
      Any kind of comment is welcome.
      Br,
      UEZ
      Change log:
       
    • TheAutomator
      By TheAutomator
      Is there a (simple) way to make your script using a picture-control to resize the gui?
      This would be useful for a transparant pop-up window with a custom made theme using picture controls:
      $Form = GUICreate('', 301, 173, 5, 5, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) GUICtrlCreatePic(@scriptdir & "\resize_win.bmp", 0, 73, 20, 51) ; some api call or code telling the os to use this picture as a resize border GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUISetState(@SW_SHOW) While True if GUIGetMsg() = $GUI_EVENT_CLOSE then Exit WEnd  
      EDIT: to make it more clear what i wanna do, if you go with the mouse arrow over the border of a re-sizable window the arrow changes to a "resize" arrow, you click and drag the border and then the window size adjusts to the mouse position until you release the mouse button.
      I want my picture control to be used the same way as the resize border to resize my window.
    • Xandy
      By Xandy
      Special thanks: AdmiralAlkex, Melba23, MrCrearoR, Dragon Warrior 3, SDL
      MapIt is a tile world editor.  MapIt was built around the concept of reversing Dragon Warrior map images.  MapIt can take image input and produce a tile and world array.  
      Changing and replacing tile / world data is easy.  B/c tile world editor.

      CTRL+R in image above to signal replace tile action and I use "G" to Get the tile under mouse.
      A full list of hotkeys can be assigned in the: Help Menu\Hotkeys
       
      MapParser is a C++ project that scans images for unique tiles. 
      MapIt can be downloaded without MapParser. MapParser can be toggled off in the Scan_Image dialog. Without MapParser, MapIt will use the Scan_Tiles() function written in AutoIt ; which is 100 * slower Idk. If MapParser.exe will not run for you:      Installing Visual C++ Redistributable for Visual Studio 2015 should fix it: https://www.microsoft.com/en-us/download/details.aspx?id=48145   
      You can start with example world and tiles.
      Example world was made following these steps:
      Started with a tile map image of DragonWarrior3 town of: Reeve From MapIt World Menu \ New \ Scan_Image dialog, I set the area to exclude the key legend to the far right of image. After scanning the map image to world and tile array.  I removed a few of the map artifacts.  More work could be done on this world; removing unwanted tiles, but it is fine for now. I saved my world to disk.  This creates folder: Worldname: Containing folder of Tiles and a Worldname.txt. Using The Gimp, I edited some tiles to have a transparent color: Stairs, Trees, Desk Tables, Chest-of-drawers, Chairs, Signs, Doors, Beds. I changed the world layers to 2: World Menu \ Properties. F9 Finds all selected tile on current layer and changes to a new selected tile on new layer. I used F9 to change all Trees on layer: 0 to Trees on layer: 1. Then I used F9 to change all Trees on layer: 0 to Grass on layer: 0  
      In this video you can see how I used the Tile Menu \ Replace From Disk option to remap tile images to my custom tiles.  Conveniently my tiles already have a transparent pixel.
      See video for how that was done:
      To use the example world:
      First unzip the world save file: http://songersoft.com/programming/mapit/worlds/Reeve_Swapped.zip From the World Menu: choose \Load Navigate to the Reeve_Swapped.txt located in the extracted zip. Or you can scan any image.
      The map images I used are here: http://www.realmofdarkness.net/dq/games/nes/dw3/maps/world
      For download, videos, and example of created world file data; please visit the MapIt webpage: http://songersoft.com/programming/mapit/mapit_about.phtml
    • Atoxis
      By Atoxis
      Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here.  However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore.
      I'm not new to au3 but i'm not the most experienced with it's syntax/commands.

      Anyways, I've looked over the big threads involving imagesearch.

      Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post.

      Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen!
      Can't find a working copy so if anyone has one please send it my way lol.

      I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working.
      Thanks.
×