Quick Any2Ico: Convert a PNG file by right-click menu

You need help to start using UVK? You have a doubt on a UVK feature? Post here!
Forum rules
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
Post Reply
amymor
Posts: 5
Joined: Fri May 01, 2020 8:40 pm

Quick Any2Ico: Convert a PNG file by right-click menu

Post by amymor »

Hello :)
i interested about Quick Any2Ico command-line ability. but i wanna create a shortcut in context menu to convert right-clicked PNG file(or selected files) to .ico in specified folder.
so i did some registry tweak:
method 1:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell\Convert To ico 64\command]
@="D:\\Downloads\\Programs\\#desktop\\#icons\\Quick_Any2Ico\\Quick_Any2Ico.exe -img=1% -icon=D:\\1.ico -formats=64,256 -pngc"
method 2:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell\Convert To ico 64\command]
@=""D:\\Downloads\\Programs\\#desktop\\#icons\\Quick_Any2Ico\\Quick_Any2Ico.exe" "1%" "-icon=D:\\1.ico" -formats=64,256 -pngc"
note: becuase WindowsPhotoViewer is registered as defualt programs for openning photos in my OS(win 10), the only way for creating a context-menu for PNG files is "HKEY_CLASSES_ROOT\PhotoViewer.FileAssoc.Png\shell"

Both methods worked but the created icon is corrupted and just showed the unknowen files icon. any way to fix it?
screenshots:
PNG file:
https://imgur.com/uBCQpmy
converted file(.ico)
https://imgur.com/rUTsAMw
https://imgur.com/GQeSeqa

thanks :)
sry for my bad eng
Last edited by amymor on Tue May 05, 2020 4:08 am, edited 2 times in total.
amymor
Posts: 5
Joined: Fri May 01, 2020 8:40 pm

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by amymor »

i fixed it. the problem was 1%. its wrong. the true one is %1. lol im stupid :mrgreen:
also method 2 didnt work with %1 so i just stick to method 1.
but still one thing remain. i wanna it also rename the created file to same name of source file.any idea?
thanks
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by Fred »

Hi amymor. Glad you nailed it. I just saw your post and I think you had an excellent idea. I will soon integrate that feature into Quick Any2Ico itself.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
amymor
Posts: 5
Joined: Fri May 01, 2020 8:40 pm

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by amymor »

Fred wrote: Sat May 02, 2020 8:07 am Hi amymor. Glad you nailed it. I just saw your post and I think you had an excellent idea. I will soon integrate that feature into Quick Any2Ico itself.
Thanks
It would be great.
amymor
Posts: 5
Joined: Fri May 01, 2020 8:40 pm

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by amymor »

Fred wrote: Sat May 02, 2020 8:07 am Hi amymor. Glad you nailed it. I just saw your post and I think you had an excellent idea. I will soon integrate that feature into Quick Any2Ico itself.
Hi again @Fred :)
I found a very little bug when i used GUI app(also found it when used command line).
The pngs converted to half sized icon also moved slightly to the left. for example i have a png with 128x128 size then converted it to icon with 64x64 size then i resized the png file to 64x64 too with PaintDotNet(for comparing purpose) and finaly when compared two image i found the icon one moved slightly to left. doesn't matter which options(center, crop, stretch, png compression) i choose, it happens every time:

1.orginal png(128x128):
https://imgur.com/KOty7lg
2.conveted icon(64x64):
http://s000.tinyupload.com/index.php?fi ... 1846447303
3.resized png(64x64):
https://imgur.com/YxP4hTH
Just download and compare 2 and 3 and you will see what i mean.

I tried many programs for converting pngs to icons and Quick Any2Ico was the best program i found. because created icons have greater quality than other icons created with other programs(like imagemagic, X2ico, Ultimate icon converter and etc).only the icons created with PaintDotNet and dihav-Png2Ico have same quality but both of them dosnt have any command-line. anyway this very little bug bothers me a little. so i would be happy if it resolves in the future. :)
Thanks
Last edited by amymor on Mon May 04, 2020 5:59 am, edited 1 time in total.
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by Fred »

anymor,

I downloaded images 2 and 3 from your last post and opened them with an image editing software called Photofiltre Studio X. Zoomed both to 500% and the result is in the picture below. I do not see any difference in the size or placement. My guess is that the software you use to view icon files automatically clips out the transparent area surrounding your image. That would explain why your image seemed clipped in the left side.
Capture.PNG
Capture.PNG (157.15 KiB) Viewed 12803 times
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
amymor
Posts: 5
Joined: Fri May 01, 2020 8:40 pm

Re: Quick Any2Ico: Convert a PNG file by right-click menu

Post by amymor »

Fred wrote: Sun May 03, 2020 8:37 am anymor,

I downloaded images 2 and 3 from your last post and opened them with an image editing software called Photofiltre Studio X. Zoomed both to 500% and the result is in the picture below. I do not see any difference in the size or placement. My guess is that the software you use to view icon files automatically clips out the transparent area surrounding your image. That would explain why your image seemed clipped in the left side.
i guess you didnt compare them properly. even in your screenshot the 2th image moved very very slighty to the left .in your screenshot the distance between 1th image and the left side is 3 pixels while it is 2.5 pixels in 2th image.If you want to see it better, you have to switch between the two images no side by side. i did it with PaintDotNet and WindowsPhotoViewer. if Photofiltre Studio X supports tabbed-view maybe you can do it and see what i mean. as i said, i tried many software for converting so if there was something wrong with the photo editor, i had to see it in other created icons too.
thank you for your reply :)
Post Reply