Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

why 256x256 icon not showing in Gui ?


  • Please log in to reply
6 replies to this topic
Klark92
  • Members
  • 870 posts
  • Last active: Dec 29 2015 09:47 PM
  • Joined: 19 Feb 2012
I added an icon to my dll file, it has 256x256 dimension .. when I embed it, It seems to me like 16x16 (quality is bad) ? is there any solution ?

I CAN PROTECT YOUR SCRIPT (ANTI-DECOMPILER by Klark92) (AHK_L*)(PM)
Klark92's Script2Exe Wizard
AHK_L / AHK COMPILED EXE / BIN ICON CHANGER


G. Sperotto
  • Members
  • 539 posts
  • Last active: Jun 20 2015 04:54 PM
  • Joined: 12 Dec 2011
Hi Klark92.

I too had some issues with this in the past.

Some possible reasons for this are:

1 - The icon in question holds more than 1 image (this is very common with icon files), and the 16x16 (with low quality) image is the one being chosen for display -> If this is the case, i suggest you download an icon editing tool and remove all undesired images from the .ico file.
2 - The icon is being automatically resized to fit some smaller display frame and this resizing is blurring the image to low quality -> If this is the case, and if that icon is a really nice one, i suggest that you try to edit and convert the images to a lower size (compatible with the display frame) manually, so you can keep a keen eye on the quality. Otherwise, if the icon is unimportant, just download a bunch of cool icons and test each of them till one "fits" the display frames (this is what i did, lol :p ).
3 - The compiler is causing this "distortion" of the images when it merges the icons into the executable -> if this is the case, either change the compiler or reverse engineer the resource section of the output PE.

Best wishes :wink:

"What is a suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!


Klark92
  • Members
  • 870 posts
  • Last active: Dec 29 2015 09:47 PM
  • Joined: 19 Feb 2012
Yes I know that , only 256x256 icon available in .ico file...
I'm using Articons pro tool, Icon is clean ... only bmp or png file can embed safely in Gui .. I did not understand that , still not solved :lol:

I CAN PROTECT YOUR SCRIPT (ANTI-DECOMPILER by Klark92) (AHK_L*)(PM)
Klark92's Script2Exe Wizard
AHK_L / AHK COMPILED EXE / BIN ICON CHANGER


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
I guess you're using AutoHotkey v1.0. AutoHotkey_L has better icon support.

Improvements to Icon Support
Unusual Sizes
Icon resources of any size supported by the operating system may be extracted from executable files. When multiple sized icon resources exist within an icon group, the most appropriate size is used. Prior to revision 17, an arbitrary icon resource was selected by the system, scaled to the system large icon size, then scaled back to the requested size.
Source: AutoHotkey_L New Features



Klark92
  • Members
  • 870 posts
  • Last active: Dec 29 2015 09:47 PM
  • Joined: 19 Feb 2012
same result for library version .. do you have an example to solve that problem ? G. Sperotto or Lexikos ? ^^

I CAN PROTECT YOUR SCRIPT (ANTI-DECOMPILER by Klark92) (AHK_L*)(PM)
Klark92's Script2Exe Wizard
AHK_L / AHK COMPILED EXE / BIN ICON CHANGER


Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Example code:
Gui Add, Picture, w256 h256 Icon1, test.dll
Gui Show
test.dll contains one icon with two images: one 16x16 "A" and one 256x256 "B".
Running the script on AutoHotkey v1.0 produces A scaled up to 256x256.
Running the script on AutoHotkey_L produces B at its original size, 256x256.
Removing h256 produces B at 256x256 on AutoHotkey_L and A at 256x16 on AutoHotkey v1.0.
Removing w256 h256 produces A on either version, but on AutoHotkey v1.0 it is scaled up to 32x32.

library version

Huh? AutoHotkey_L does not mean "AutoHotkey library version".

Klark92
  • Members
  • 870 posts
  • Last active: Dec 29 2015 09:47 PM
  • Joined: 19 Feb 2012
so _L mean Lexikos ? ^^

I CAN PROTECT YOUR SCRIPT (ANTI-DECOMPILER by Klark92) (AHK_L*)(PM)
Klark92's Script2Exe Wizard
AHK_L / AHK COMPILED EXE / BIN ICON CHANGER