Poor icon graphics on windows excecutable app - electron

Why my electron app has poor icon graphics
I recently create and electron app however when i package it with electron rebuild the icon graphics of the installer and installed app are really poor on windows.
The icon am using is 512x512 and i don't have the same problem when i package it to Linux executable .deb file.
As you can see the icon is not perfect.
Is there a way to improve the icon quality?

It's because your 512x512 icon was scaled down to fit with windows desktop's icons's size.
I would suggest you to create an ico file from your icon, this file contains following multiple sizes: 16, 24, 32, 48, 64, 128, 256.
After that, put your icon under build directory with name as icon.ico

Related

Application icon in Delphi 2007 limited to 32 pixels

When i put an icon in my application using the menu Project > Options > Load icon, it will allow me a max size of 32x32 pixels.
This size looks nice in the app window, but the problem is, when there is a shortcut to the app on Windows desktop or Start menu, the icon is stretched to a larger size and looks blurred.
Is there a way to put a larger icon size in my app resource file, so Windows can use the larger size when needed ? If so, how to do it ?
Thanks in advance !

Use one icon size in Xcode

I generate a lot of apps for clients. Nowadays there are a lot of different icon sizes (57, 72, 114, 144, 120, 152, 180) in addition to the 1024 sized icon that we upload to iTunesConnect.
In practice, though, I just design the large 1024-sized icon, then manually resize the icon to all of those other sizes and put them in an asset catalog.
That seems like pointless busy work. Is it possible to just give Xcode my 1024x1024 icon and let the tools autoresize it to a smaller version?
The macOS Terminal can really help you here.
If you wanted to resize an image named myicon1024x1024.png to an image of the same filetype, but 72x72, open Terminal, use the cd command to change directories to where your myicon1024x1024.png image is, then execute this command:
sips -z 72 72 myicon1024x1024.png --out myicon72x72.png
The "sips" command has a lot of other options, which can be googled or learned from its man page.
You can also make a bash script which could take the input of your file's name, then call sips once for each icon size you want to create. Of course, the output of this bash script ends up being the same as what you would get from makeappicon.com, so you'd still have to move the files into Xcode.
I don't think Xcode will allow this. However you can try using a web based application for resizing your icons simply. Try makeappicon.com. I am sure there are others out there.
It makes me very sad to write it here but I use Unity for it :-) Yes, 3D engine! Just create empty project, switch platform to iOS, set one 1024 icon and let build the project. Then you can drag and drop pre-made AppIcon into you XCode.

Xcode 5.02 Photoshop icon creation

I am currently trying to push an app to the store (Build > Archive), but it keeps complaining about sizes of icons and certain sizes not actually existing.
I cannot find a slot in the Images.xcassets > App icon for a 120 or a 152, so first where do I put these icons so that it builds correctly.
Secondly, this is ridiculous, is there a photoshop script I can use that does the same icon up in 120, 152, and whatever other sizes it needs.
App script for photoshop
http://www.appsbynight.com/2012/09/17/create-every-ios-icon-for-your-app-with-a-photoshop-script/
Not used it, as I have a program on the Mac that converts it for me from a large image to smaller ones.. see below and is free...
https://itunes.apple.com/us/app/prepo/id476533227?mt=12
also the images to have #2x for the larger ons
so
icon-60.png
icon-60#2x.png (120 sized one)
This is not ridiculous.
2*60 = 120
2*76 = 152
Note that's said in "points" and not pixels. You have to check for the coefficient (x2 for Retina Display). Plus, since in iOS7 sizes changed, all iPhone/iPod Touch which can have iOS7 are Retina (that's why there is only the "x2" for iOS7 iPhone). For iPad, there is iPad Mini (non-retina).
I have modified an old photoshop script to create icons that have a size that matches the requirements in xcode 5.2
https://gist.github.com/derpest/8437300
Adding the correct icon to the correct place stops the errors upon validating to push to store.
A good explanation of this is explained here: 'Missing recommended icon file - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format'
If you want an automated way to make your icons at all the right sizes, check out the App Icon Template. It’s a Photoshop file and a companion action that let you design your icon once, then export it all at once. Be warned that you may want to tweak your icons at each individual size to get the best look, but this is a good starting point because it lets you quickly preview your icon at all sizes.

Windows 7-compatible icon set in a Delphi 2007 application

What is the right way to define a win7-compatible icon set in a Delphi application ? ( variable size on desktop )
I have designed a 256*256 icon then made the 16*16, 24*24, 48*48 variants. ( in Microsoft UX guide, they seem to say that these sizes should be included for a correct display on the desktop).
I've put all icons variations in a multiple layer document in Gimp and exported the whole stuff as an ico. Then I've put it as the application icon in the project options, following the straight way to assign an icon to an application.
FInally I've put a shorcut on Win desktop (win7) but when making "Ctrl+Wheel" (resizing of desktop icons, if you don't know it yet...) on the desktop (Win 7), correct icon is not displayed, after 48*48 it keeps the same size ( I suspect that only the 48*48 version is used).
The 256px sized icon should be a compressed PNG icon. I suspect that the resource compiler shipped with Delphi 2007 won't like that format so you'll need to use the MS resource compiler, rc. The icon should be named MAINICON. That said, I suspect that a 256px bitmap will work, it will just be exceedingly large.
What's more, IIRC, the Delphi IDE doesn't like 256px PNG icons so it's no good adding the icon to the project through the IDE. You need to build the .res file yourself and link it with a {$R ...} directive.
Finally, its possible that your .ico file may not be correct. The 256px image is actually stored with width and height equal to 0 because that field is byte sized and 0 was formerly invalid. Perhaps this is what the IDE gags on. Check the .ico file out in a different tool, e.g. IcoFX.
There may be other problems—these are just the ones I can recall encountering over the years. If I had to guess as to which issue was biting you, I'd say it was the inability of the IDE to handle 256px icons.
I believe that the IDE has got progressively better in this area in more recent versions, but even in D2010 which I currently use, it's not perfect.

Problem changing icon in Delphi 2007

I've been working with a program someone else has made and I wanted to change the icon.
The icon I have is 256x256. I used http://converticon.com/ to create the icon (from a bmp I think). I used the icon in Inno Setup to create an installer and it worked fine
So I go to Options -> Application and attempt to load it. However, Delphi 2007 gives me an error 'The parameter is incorrect.' with this info: http://i.stack.imgur.com/vRCgs.png
When I do the same thing in Delphi XE, it works and loads the icon and changes it on compile. I can't use XE right now because the program uses a math parser that has a problem with unicode (thats something to fix for later haha)
So, what I did was open the project in XE, change the icon, save it, delete the dproj and open it in 2007. This works, compiles and displays the correct icon, but when I go to the project options, it gives me the same 'The parameter is incorrect' error.
The workaround isn't a big deal, but I shouldn't need to do it. Does anyone know why I can't change the icon in Delphi 2007?
Edit: I just used that same converticon site to convert the 256x256 icon to 192x192 and smaller and now it works perfectly. Thanks for the answers
The "icon" file is actually a collection of images, at different resolution and using different encodings. When I'm creating my icons I'm making sure they don't actually contain the 256x256 PNG-encoded version because development tools built before Windows Vista don't understand that. And that includes your Delphi 2007 and my Delphi 7. I also remove the alpha-encoded 256x256 icon because it simply makes the file needlessly large.
You've got two fixes possible:
Find an ICO editor and remove all of the larger formats until your Delphi accepts the icon. I personally never seen the 256x256 used in the real world, they'd take up huge amounts of space on user's Desktop or in Windows Explorer.
Use a dummy icon and replace the icon resource in the generated exe after Delphi is done with it. This way you can keep all of the larger image formats, including the 256x256 PNG image.
Edit to correct an error
If possible, always include the 256x256 image, Windows scales that down for everything above 64x64.
I always assumed Windows Explorer would show an image that's based on the closest matching image size available in the ICO. That is, if a 128x128 image is necessary, Windows would use the 128x128 image if available, or scale down the 256x256 image if that's available, or scale up the 96x96 image. Apparently that's not so. I've just made a test icon consisting of several image formats, including 32, 48, 72, 96, 128 and 256 consisting of simple blobs of color (using the flood-fill tool). In Windows Explorer I cycled throw the various Display Modes, and it became apparent that starting with "Large Icon" (and that's not very large) Windows will scale down the 256x256 icon, and if that's not available, use the 48x48 icon, unscaled! The result is truly ugly and unexpected. The 72x72, 96x96 and 128x128 icons were simply ignored.
Thank you David for pointing this out.
Older versions of Delphi don't support 256px Vista icons. I believe that 2010 does not support them so I guess the limitation was fixed in XE.
When working with an older Delphi you'll need to keep the 256px icon out of the IDE. You can still build an executable with a 256px icon from the command line compiler - I used to do just this before upgrading from Delphi 6. But to do this requires the use of a competent resource compiler, for example the Microsoft one.
2007 will let you select icons with a 256 pixel image. Here is what I tried:
The default icon for Delphi XE contains several image sizes, including a 256 pixel image.
If I extract the icon from a Delphi XE application using a resource editor, I can add that icon to a Delphi 2007 application using the IDE's project options. I don't get an error, and the icon images show as expected in Windows Vista/7 using Explorer at different sizes.
If I take the same icon that worked in Delphi 2007 and remove all of the image sizes other than the 256 pixel image using IcoFX, and try to select it again, then I get an error.
Try creating a .ico that includes other image sizes and see if that works for you.

Resources