Jump to content

Blurry icons


 Share

Recommended Posts

I have some really hi-res icons but, when I use them wth AutoIT, they appear REALLY blurry. I searched these forums for "blurry icons" and "icon resolution" with no meaningful hits.

When I look at these icons in Vista Windows Explorer, they look great at any folder view setting, Small Icons, Medium Icons, Large Icons, and Extra Large Icons. These are reall hi-res icons that look great at any size.

Here is the code:

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=C:\Users\Jeff\Documents\TEST.exe
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (11).ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (22).ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (29).ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (67).ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (88).ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Users\Jeff\Documents\Windows 7 Beta Icon Pack\Windows 7 (207).ico
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$gui = GUICreate(@ScriptName,600,200)
GUISetIcon(@ScriptFullPath,-10)
TraySetIcon(@ScriptFullPath,-10)

TrayTip(@scriptname, "testing 123 testing 123 testing 123 testing 123 testing 123 testing 123 testing 123 ", 2, 1)

$b1 = GUICtrlCreateIcon(@ScriptFullPath,-7,  0,0)
$b2 = GUICtrlCreateIcon(@ScriptFullPath,-9, 50,0)
$b3 = GUICtrlCreateIcon(@ScriptFullPath,-5,100,0)
$b4 = GUICtrlCreateIcon(@ScriptFullPath,-8,150,0)
$b5 = GUICtrlCreateIcon(@ScriptFullPath,-6,200,0)

GUISetState(@SW_SHOW); will display an empty dialog box

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
Exit
Link to comment
Share on other sites

If they are blurry, this mean that resizing occuring. AFAIK in Vista default size is 48x48, while Autoit default icon size is 32x32. Try to use explicit size in the icon definition, for example

$b1 = GUICtrlCreateIcon(@ScriptFullPath,-7, 0, 0, 48, 48)

Link to comment
Share on other sites

Sorry, I tried Yasheid's examples and they are also very blurry. Even Yashied's example screenshot is blurry.

Fine, when I try icon size of 32, it doesn't seem blurry because the icon is too small. The minute I double it to a reasonable size, say, 64, it becomes almost unrecognizable. Vista Windows Explorer is able to display much much larger renditions of these icons which are crystal clear.

Everything else on my computer is crystal clear ... only icons and pictures in AutoIt are blurry. I hear some people saying something about resizing and resolution but, if other apps can handle it, what do I need to do to clean up the appearance of apps created with AutoIT.

While Monet might be happy with the appearance of these icons, I want to improve them. I have a funny feeling there is something I am missing but I don't know what it is.

Link to comment
Share on other sites

#Include <Icons.au3>

GUICreate('My GUI', 768, 256)
$Icon8 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 0, 0, 8, 8)
$Icon16 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 8, 0, 16, 16)
$Icon24 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 24, 0, 24, 24)
$Icon32 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 48, 0, 32, 32)
$Icon48 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 128, 0, 48, 48)
$Icon128 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 256, 0, 128, 128)
$Icon256 = GUICtrlCreateIcon('Windows_7__5_.ico', 0, 512, 0, 256, 256)
GUISetState()

Do
Until GUIGetMsg() = -3oÝ÷ ØÝyçbB¶¹B­æ­x(ø¡ë'¢Û.¦+µ¸ ²,ÞÝvò'(Æî·*.q©ìj÷­è¢x§

Windows_7__5_.png

Link to comment
Share on other sites

I changed _SetImage to GUICtrlSetImage but nothing worked as I got a blank GUI. Yes, I used the full file spec.

GUICreate('Test', 400, 400)
$Pic = GUICtrlCreatePic('', 72, 72)
GUICtrlSetImage($Pic, "C:\Users\Jeff\Documents\ok.png")
GUISetState()

Do
Until GUIGetMsg() = -3
Link to comment
Share on other sites

I changed _SetImage to GUICtrlSetImage but nothing worked as I got a blank GUI. Yes, I used the full file spec.

GUICreate('Test', 400, 400)
$Pic = GUICtrlCreatePic('', 72, 72)
GUICtrlSetImage($Pic, "C:\Users\Jeff\Documents\ok.png")
GUISetState()

Do
Until GUIGetMsg() = -3
GUICtrlSetImage() does not support PNG, use _SetImage() or _SetHImage() from my UDF. Edited by Yashied
Link to comment
Share on other sites

I've moved on ... Webdings works better.

#include <WindowsConstants.au3>

$iSize = 64
$gui = GUICreate("test",$iSize,$iSize*5,400,400,-1,$WS_EX_TOPMOST+$DS_MODALFRAME)

$Button1 = GUICtrlCreateButton(Chr(52), 0, 0, $iSize, $iSize)
GUICtrlSetFont($Button1,64,400,-1,"Webdings")
GUICtrlSetColor($Button1,0x00cc00)
GUICtrlSetBkColor($Button1,0x000000)
GUICtrlSetTip($Button1, "Play")

$Button2 = GUICtrlCreateButton(Chr(61), 0, $iSize, $iSize, $iSize)
GUICtrlSetFont($Button2,48,400,-1,"Webdings")
GUICtrlSetColor($Button2,0xff0000)
GUICtrlSetBkColor($Button2,0x000000)
GUICtrlSetTip($Button2, "Record")

$Button3 = GUICtrlCreateButton(Chr(64), 0, $iSize*2, $iSize, $iSize)
GUICtrlSetFont($Button3,48,400,-1,"Webdings")
GUICtrlSetColor($Button3,0x00ffff)
GUICtrlSetBkColor($Button3,0x000000)
GUICtrlSetTip($Button3, "Settings")

$Button4 = GUICtrlCreateButton(Chr(114), 0, $iSize*3, $iSize, $iSize)
GUICtrlSetFont($Button4,48,400,-1,"Webdings")
GUICtrlSetColor($Button4,0xffff00)
GUICtrlSetBkColor($Button4,0x000000)
GUICtrlSetTip($Button4, "Delete")

$Button5 = GUICtrlCreateButton(Chr(76), 0, $iSize*4, $iSize, $iSize)
GUICtrlSetFont($Button5,48,400,-1,"Webdings")
GUICtrlSetColor($Button5,0xffffff)
GUICtrlSetBkColor($Button5,0x000000)
GUICtrlSetTip($Button5, "Find")

GUISetState()

Do
Until GUIGetMsg() = -3
Link to comment
Share on other sites

I've moved on ... Webdings works better.

#include <WindowsConstants.au3>

$iSize = 64
$gui = GUICreate("test",$iSize,$iSize*5,400,400,-1,$WS_EX_TOPMOST+$DS_MODALFRAME)

$Button1 = GUICtrlCreateButton(Chr(52), 0, 0, $iSize, $iSize)
GUICtrlSetFont($Button1,64,400,-1,"Webdings")
GUICtrlSetColor($Button1,0x00cc00)
GUICtrlSetBkColor($Button1,0x000000)
GUICtrlSetTip($Button1, "Play")

$Button2 = GUICtrlCreateButton(Chr(61), 0, $iSize, $iSize, $iSize)
GUICtrlSetFont($Button2,48,400,-1,"Webdings")
GUICtrlSetColor($Button2,0xff0000)
GUICtrlSetBkColor($Button2,0x000000)
GUICtrlSetTip($Button2, "Record")

$Button3 = GUICtrlCreateButton(Chr(64), 0, $iSize*2, $iSize, $iSize)
GUICtrlSetFont($Button3,48,400,-1,"Webdings")
GUICtrlSetColor($Button3,0x00ffff)
GUICtrlSetBkColor($Button3,0x000000)
GUICtrlSetTip($Button3, "Settings")

$Button4 = GUICtrlCreateButton(Chr(114), 0, $iSize*3, $iSize, $iSize)
GUICtrlSetFont($Button4,48,400,-1,"Webdings")
GUICtrlSetColor($Button4,0xffff00)
GUICtrlSetBkColor($Button4,0x000000)
GUICtrlSetTip($Button4, "Delete")

$Button5 = GUICtrlCreateButton(Chr(76), 0, $iSize*4, $iSize, $iSize)
GUICtrlSetFont($Button5,48,400,-1,"Webdings")
GUICtrlSetColor($Button5,0xffffff)
GUICtrlSetBkColor($Button5,0x000000)
GUICtrlSetTip($Button5, "Find")

GUISetState()

Do
Until GUIGetMsg() = -3
Congratulations to you!
Link to comment
Share on other sites

  • 2 months later...

@Jaja714

Do you perhaps mean the GUI icon ?

I noticed that the icon displayed while using ALT-Tab are far below the quality

Vista and Windows 7 both support PNG compressed 256x256 images .. but they aren't used when executing an autoit application. When you check the AutoIt executable with Reshource Hacker you will also see that there is no 256x256 image.

Best regards,

Emiel

Best regards,Emiel Wieldraaijer

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...