wakillon Posted June 30, 2013 Posted June 30, 2013 (edited) Polaroider 1.0.3.1 Easily Create a picture as a Polaroid and be able after, to create Custom Photos Polaroid Collage. May be you know Pola a soft for create easily Polaroid-like photos from your digital images, but after some tries, i didn't find it very handy ! So i made mine. Photo can be positioned by drag and zoomed/unzoomed with mouse wheel ( sorry for Touchpad user ) Polaroid can be inclined 10 or 20 degrees, on left or right, and with simple or multiple frames. Inclination will only be visible on the saved shoot. It is also saved with a transparent background for be able to create "Pêle-Mêles" (in french) with a photo editor. I have set the desktop as save directory. previous downloads : 122 source and executable are available in the Download Section All files are included in script. I hope you will like it ! Happy Shooting ! Edited February 3, 2016 by wakillon PlayHD and JohnOne 2 AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
UEZ Posted June 30, 2013 Posted June 30, 2013 (edited) Nice work wakillon. Just add to line 611 DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hGraphic6, "int", 4) to add also antialiasing to Vista+ os. And here a code to get some information about images: #include <GDIPlus.au3> Global $sFile = FileOpenDialog("Select an image", "", "(*.jpg;*.png;*.bmp;*.gif;*.tif;*.ico;*.emf;*.wmf)") If @error Then Exit _GDIPlus_Startup() Global $hImage = _GDIPlus_ImageLoadFromFile($sFile) Global $aPixelFormat = _GDIPlus_ImageGetPixelFormat($hImage) Global $aImageRawFormat = _GDIPlus_ImageGetRawFormat($hImage) Global $hImageContext = _GDIPlus_ImageGetGraphicsContext($hImage) Global $aImageDPIX = DllCall($ghGDIPDll, "uint", "GdipGetDpiX", "handle", $hImageContext, "float*", 0) Global $aImageDPIY = DllCall($ghGDIPDll, "uint", "GdipGetDpiY", "handle", $hImageContext, "float*", 0) MsgBox(0, "Image Information", "Filename: " & $sFile & @LF & @LF & _ "Width: " & @TAB & @TAB & _GDIPlus_ImageGetWidth($hImage) & @LF & _ "Height: " & @TAB & @TAB & _GDIPlus_ImageGetHeight($hImage) & @LF & _ "DPI: " & @TAB & @TAB & Round($aImageDPIX[2], 0) & "x" & Round($aImageDPIY[2], 0) & @LF & _ "Color Depth: " & @TAB & $aPixelFormat[1] & @LF & _ "Image Type: " & @TAB & $aImageRawFormat[1], 30) _GDIPlus_GraphicsDispose($hImageContext) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Exit When loading large images and moving around the window the window will be jerky. My suggestion scale down the preview image instead to copy always the large image to the preview gfx handle. Are the tiny loves your kids? Br, UEZ Edited June 30, 2013 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Danyfirex Posted June 30, 2013 Posted June 30, 2013 Very nice thank you very much. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
TheSaint Posted July 1, 2013 Posted July 1, 2013 Looks good. Thanks for sharing! Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
wakillon Posted July 1, 2013 Author Posted July 1, 2013 Nice work wakillon. Just add to line 611 DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hGraphic6, "int", 4) to add also antialiasing to Vista+ os. And here a code to get some information about images: #include <GDIPlus.au3> Global $sFile = FileOpenDialog("Select an image", "", "(*.jpg;*.png;*.bmp;*.gif;*.tif;*.ico;*.emf;*.wmf)") If @error Then Exit _GDIPlus_Startup() Global $hImage = _GDIPlus_ImageLoadFromFile($sFile) Global $aPixelFormat = _GDIPlus_ImageGetPixelFormat($hImage) Global $aImageRawFormat = _GDIPlus_ImageGetRawFormat($hImage) Global $hImageContext = _GDIPlus_ImageGetGraphicsContext($hImage) Global $aImageDPIX = DllCall($ghGDIPDll, "uint", "GdipGetDpiX", "handle", $hImageContext, "float*", 0) Global $aImageDPIY = DllCall($ghGDIPDll, "uint", "GdipGetDpiY", "handle", $hImageContext, "float*", 0) MsgBox(0, "Image Information", "Filename: " & $sFile & @LF & @LF & _ "Width: " & @TAB & @TAB & _GDIPlus_ImageGetWidth($hImage) & @LF & _ "Height: " & @TAB & @TAB & _GDIPlus_ImageGetHeight($hImage) & @LF & _ "DPI: " & @TAB & @TAB & Round($aImageDPIX[2], 0) & "x" & Round($aImageDPIY[2], 0) & @LF & _ "Color Depth: " & @TAB & $aPixelFormat[1] & @LF & _ "Image Type: " & @TAB & $aImageRawFormat[1], 30) _GDIPlus_GraphicsDispose($hImageContext) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Exit When loading large images and moving around the window the window will be jerky. My suggestion scale down the preview image instead to copy always the large image to the preview gfx handle. Are the tiny loves your kids? Br, UEZ Hi UEZ Is the antialiasing line you suggest need to be repeat for other graphics handles ? And i don't understand your scale down preview image suggestion...do you want to reduce the preview ? i found it so small ! It interest me because i'm working on another project with bigger photos than this preview. And yes, it's my kids (photos are old now) Thanks for your help! Very nice thank you very much. Glad you like it ! Looks good. Thanks for sharing! Thanks ! AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
UEZ Posted July 1, 2013 Posted July 1, 2013 Hi UEZ Is the antialiasing line you suggest need to be repeat for other graphics handles ? And i don't understand your scale down preview image suggestion...do you want to reduce the preview ? i found it so small ! It interest me because i'm working on another project with bigger photos than this preview. And yes, it's my kids (photos are old now) Thanks for your help! Glad you like it ! Thanks ! Yes, you can add also to the other gfx handles which makes sense, otherwise only GUI text is anti aliased. Regarding scale down preview: your polaroid preview has a dimension of 285x285 px and e.g. if you load an image with dimension 2400x3200 px you always copy that image to the preview handle which slows down it extremely. I would scale the image down once only to display it in the preview handle. It will be much faster on repaint activities. Very cute kids on that picture. 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
trancexx Posted July 2, 2013 Posted July 2, 2013 Nice. And lovely kids! I'm running executable you provided and unfortunately I get crashes on exit, for example if I start the app and then do nothing but close it. I was intrigued so I went through the source you provided and really without goinng too deep saw it's the _ControlGlobalSubclass() that causes the issues. ♡♡♡ . eMyvnE
wakillon Posted July 2, 2013 Author Posted July 2, 2013 Yes, you can add also to the other gfx handles which makes sense, otherwise only GUI text is anti aliased. Regarding scale down preview: your polaroid preview has a dimension of 285x285 px and e.g. if you load an image with dimension 2400x3200 px you always copy that image to the preview handle which slows down it extremely. I would scale the image down once only to display it in the preview handle. It will be much faster on repaint activities. Very cute kids on that picture. Br, UEZ Ok, if after drag'n drop, i do a copy of the photo with a reduced size, it will be less jerky, I'm right ? But if size is reduced, is quality zoom not affected ? AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
wakillon Posted July 2, 2013 Author Posted July 2, 2013 (edited) Nice. And lovely kids! I'm running executable you provided and unfortunately I get crashes on exit, for example if I start the app and then do nothing but close it. I was intrigued so I went through the source you provided and really without goinng too deep saw it's the _ControlGlobalSubclass() that causes the issues. Hi trancexx, glad you like it ! I can't reproduce your crashes (win7x64) Can you please try this debug way ? 1 - add If @error Then ConsoleWrite ( '@error : ' & @error & @Crlf ) after _ControlGlobalSubclass () line 2 - replace _ControlGlobalSubclass () function by this one Func _ControlGlobalSubclass () ; by rover If $hNew_ControlProc <> 0 Then Return SetError ( 1, 0, 0 ) Local $hGUITemp = GUICreate ( '', 1, 1, -10, -10 ) Local $hButtonTemp = GUICtrlGetHandle ( GUICtrlCreateButton ( '', -10, -10, 1, 1 ) ) $hNew_ControlProc = DllCallbackRegister ( '_WndProc', 'int', 'hwnd;uint;wparam;lparam' ) If $hNew_ControlProc = 0 Then Return SetError ( 2, 0, 0 ) Local $pCallbackPtr = DllCallbackGetPtr ( $hNew_ControlProc ) If $pCallbackPtr = 0 Then Return SetError ( 3, 0, 0 ) $pOriginal_ButtonProc = DllCall ( $hUser32DLL, 'dword', 'SetClassLongW', 'hwnd', $hButtonTemp, 'int', -24, 'ptr', $pCallbackPtr ) ; $GCL_WNDPROC If @error Then Return SetError ( 4, 0, 0 ) $pOriginal_ButtonProc = $pOriginal_ButtonProc[0] GUIDelete ( $hGUITemp ) Return SetError ( 0, 0, 1 ) EndFunc ;==> _ControlGlobalSubclass () 3 - and in _OnAutoItExit () function replace DllCallbackFree ( $hNew_ControlProc ) by : If $hNew_ControlProc <> 0 Then DllCallbackFree ( $hNew_ControlProc ) If @error Then ConsoleWrite ( '@error : ' & @error & @Crlf ) EndIf Thanks for your help Edit : it's a >Rover's tips for prevent dotted focus lines on controls. Edited July 2, 2013 by wakillon AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
trancexx Posted July 2, 2013 Posted July 2, 2013 ^^ I don't have AutoIt installed here where I am so I can't run scripts. ...I can run executables though. ♡♡♡ . eMyvnE
trancexx Posted July 2, 2013 Posted July 2, 2013 (edited) Take rover's example and remove line GUIDelete($hGUI) ... then try it. What results you get there? I see he has this comment which you ignored: ; Must delete subclassed controls before freeing DLLCallbacks <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Edited July 2, 2013 by trancexx ♡♡♡ . eMyvnE
wakillon Posted July 2, 2013 Author Posted July 2, 2013 ^^ I don't have AutoIt installed here where I am so I can't run scripts. ...I can run executables though. Oh, ok So could you try this Polaroider v1.0.2.9.exe modified ? AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
wakillon Posted July 2, 2013 Author Posted July 2, 2013 Take rover's example and remove line GUIDelete($hGUI) ... then try it. What results you get there? I see he has this comment which you ignored: ; Must delete subclassed controls before freeing DLLCallbacks <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Results return absolutely no crashes, compiled or not, after 10 tries... +>09:56:04 AutoIt3.exe ended.rc:0 >Exit code: 0 Time: 3.518 AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
trancexx Posted July 2, 2013 Posted July 2, 2013 Still, could you add line like that to your app and upload it for me. Polaroider v1.0.2.9.exe crashes for me also. ♡♡♡ . eMyvnE
wakillon Posted July 2, 2013 Author Posted July 2, 2013 Still, could you add line like that to your app and upload it for me. Polaroider v1.0.2.9.exe crashes for me also. No problem, GUIDelete ( $hGUI ) added in _OnAutoItExit function. Polaroider v1.0.3.0.exe i must change file version because with googlecode each uploaded file must have a distinct name. AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
trancexx Posted July 2, 2013 Posted July 2, 2013 No problem, GUIDelete ( $hGUI ) added in _OnAutoItExit function. Polaroider v1.0.3.0.exe i must change file version because with googlecode each uploaded file must have a distinct name. That's the same. ♡♡♡ . eMyvnE
trancexx Posted July 2, 2013 Posted July 2, 2013 No wait, that's fine now. I was running older version. Yep, that one is good! ♡♡♡ . eMyvnE
wakillon Posted July 2, 2013 Author Posted July 2, 2013 No wait, that's fine now. I was running older version. Yep, that one is good! Cool, thanks for your help ! I look forward to see your polaroids ! AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
trancexx Posted July 2, 2013 Posted July 2, 2013 I look forward to see your polaroids ! Nice one. Thanks for fixing it for me. ♡♡♡ . eMyvnE
wakillon Posted July 2, 2013 Author Posted July 2, 2013 Nice one. Thanks for fixing it for me. All thanks are for you, and between us, I couldn't resist to the beautiful smile of your avatar! AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now