VB6 App Icon - pixelated - vb6

I have an icon that has 32 (256x256, 48x48, 32x32, 16x16), 8 (256x256, 48x48, 32x32, 16x16) and 4 (32x32, 16x16) bit icons.
I have specified that I want to use my icon for the form and application itself and for some reason, after I run application and once i am in the application, rather than using nice icon application uses 4bit icon for all areas?
I happen to find this article:
http://www.vbaccelerator.com/home/VB/Tips/Setting_the_App_Icon_Correctly/article.asp
It doesn't seem to explain easily on how to create an RC and RES file

I have found that the best approach is to only have one icon image per icon file. If you expect the icon to show as a 16x16 then provide a .ico file with a 16x16 icon in (say) 8-bit colour. That way VB has to use the icon you provide. It may mean you end up with a few file versions (16x16, 32x32) of the same icon but it makes like much easier.

Related

Get Windows 10 Jump List pin button icons

Windows 10 has new pin icons in the Jump List. Black and white for different themes.
Old Windows 7 pin icons stayed inside imageres.dll, ID 5100, 5101.
Where are new icons stored? How get they with WinAPI?
Icons have traditionally been raster images. The benefit of raster images is, that they are blazingly fast to render. That speed comes with a downside, namely that raster images only look good at a narrow range of pixel densities. That was great for as long as most displays had a pixel density of 96 PPI (pixels per inch). With pixel densities increasing, raster images stopped being as useful as they used to be. On high-density displays, icons would either render too small, or had to be scaled up with all sorts of visual artifacts.
To address this, Windows 8 introduced font-based icons as the Windows UI Symbol font, that was superseded in Windows 10 by the Segoe MDL2 Assets font. Fonts are vector-based, and can be scaled across a wide range without (or very little) visual artifacts.
While I have not verified, whether the Windows Shell actually does use font icons, the icons you are looking for are available in the Segoe MDL2 Assets font with Unicode code points in the private use area:
U+E718 ("Pin")
U+E77A ("Unpin")
Since Windows 10 version 1903, icon resource files have been relocated to: C:\Windows\SystemResources\imageres.dll.mun
There is now a new extension for these files .mun instead of .mui (which still exist in system32 and syswow64 sub folders.
Also see the answer to the question Can I trust imageres.dll system icons indexes?:
The correct way to get the icons is to use SHGetStockIconInfo. It will tell you where the icon is in the current version of Windows.
If you want the system's current folder icons (which may not be the standard ones due to user customization), use SHGetFileInfo.

tvOS Icon-Set template

For a tvOS app I am trying to set up the App Icon. First xCode complained about the size and now about the image's alpha.
/var/folders/fc/s3m4kgtn2gs977m4k8x2s2xm0000gn/T/Large-AppIcon-Scratch-4AC4A1D7-D8F5-4D58-8667-A11E4F2DE7DA.xcassets:
The last image stack layer with content, "Back", must be a fully
opaque bitmap. The pixel at position (0, 0) has an alpha value of 212.
Are there any easy instructions, tools, or templates which can be used to create a proper App Icon & Top Shelf Image.brandassets ?
(without Photoshop CC!)
Bohemian Coding's Sketch is a great tool to use. If you don't want to spend $100, you can simply use a program like Paint.
For the small icon, each layer should be 659x371.
For the large icon, each layer should be 1977x1113. (3x the size of the small icon).
The bottom layer cannot have any transparency, but the top two need to have transparency.
Also be sure to leave plenty of buffer room around the outside of your icon.
I was dealing with this issue for a while. Finally it dawned on my that Layer 0 can have transparency but Layer 1 cant. With that said, I thought Layer 0 would of been the background and Layer 1 in the foreground, but its the opposite. Layer 0 is the closest to you, if that makes sense.
Instructions can be found in the Apple TV Human Interface Guidelines. There is also a link to download resource templates including templates for both app icons and the topshelf image.
If you provide an opaque back layer for the app icons then your problem should disappear.
You can use any tool of choice, preferably one that is able to import .psd files (the templates are in .psd format). Personally I use Pixelmator. AFAIK GIMP also supports importing .psd files.

Reduce size of a .png image without losing transparency

Basically, I'd like to resize or resample a .png image (in order to reduce its file size) and yet retain it's transparency.
Anybody got an idea how best to go about this?
Thanks.
You can use paint.net, it is a free tool. Although it is pretty basic, it does the job.
Go to Image > Resize
Stumbled upon this thread and found the following site that does exactly what is requested: https://onlinepngtools.com/resize-png
What graphics program are you using?
Photoshop does this by simply going thru IMAGE > IMAGE SIZE and resizing. Transparency is not affected.
I'm sure Paint Shop Pro does the same
I know this is an old question, but the answer that worked for me was to use Inkscape.
Start Inkscape (free on Inkscape.org).
File -> Import... (Ctrl+I) the PNG file you want to resize (defaults on import dialog are ok).
With the image you just imported selected, select File -> Export PNG image... (Shift+Ctrl+E)
In the Export PNG Image tool pane, click the Export As... button to set the output filename and location.
In this same tool pane, set the image size using width/height or pixels.
In this same tool pane, click the Export button to create the output file.
This worked for me, hope it helps someone else.
Providing the image you have created / have been working on is transparent in the first place, using the "Resize" or "Resample" tools in any major image editing package (e.g. PhotoShop, PaintShop Pro and so on) should not affect (or lose) the transparency at all.
I use PaintShop Pro (X6, 64 Bit) myself and typically find that the "PNG Optimizer" option offers more options along these lines (than the default "Save As > .png" route).
Hope that this helps (specific to PaintShop Pro Users) in relation to the source question.
While I was waiting for the downloads of other image editing softwares, I tried Microsoft Power Point and succeeded in preserving the transparency.
Drag the image inside any slide, crop or resize, then save as a new picture as .png.
You can drag the image back in ppt to confirm the transparency is maintained
The complete Autodesk Sketchbook is now out for free including all the previous premium features such as resizing an image.
You do it as you would in paint by clicking on Image > Image Size... and then you can save as a .png without losing transparency.
Image size can be reduced by reducing number of colors and there are online tools to do this .
Try these..Hope they solve your problem
https://tinypng.com/‎
http://pngcrush.com/ and
http://tools.dynamicdrive.com/imageoptimizer/ --It provides more output images with different number of colors. However, smoothness will be effected, take care.

How to change the Icon of a MFC-Application without changing each sub-image?

when I open the application icon of a MFC-project with Visual Studio 2008 there are 13 images (different sizes, different color palette). How would you change the icon of your MFC-application without changing each image?
Thanks!
I like to use the Icons file type extension with Paint.NET. When you open a .ICO file it will prompt you for which image to open - select only the largest / highest-bit image. Make your changes, and then save. You will be prompted for which sizes and bitness to save - select the same list that was present in the original icon.
Using this method, you will get automatically scaled and dithered icons at the smaller sizes. A designer would actually tweak the icons at each size to get the best look, but for most applications this technique produces something that is usable.
An icon resource typically contains many different versions of an icon. For an application icon you would expect 16x16, 32x32, 48x48 and 256x256. You'd also expect to see the 3 smaller ones at 32 bit colour, 8 bit colour 4 bit colour. Or some variant on that. Microsoft publishes guidelines.
Why so many different versions of the same icon?
Well, the icon will be drawn in different settings. On a window caption bar, the 16px version will typically be shown. On the Windows 7 taskbar the 48px version will be shown. When usint ALT+TAB in XP the 32px will be shown. In Vista/7 explorer with ultra large icon view, the 256px will be shown.
To obtain the best visual appearance you must have different versions of the image for different sizes because small raster images aren't easy to scale. What's more, you may present a slightly different version of the icon at different resolutions. For example you may use 3D effects only on larger resolution, partial transparency versions.
When using remote desktop, lower colour depths may be used if the connection is bandwidth challenged.
The MS guidelines go into these issues in detail.
The normal practice of for the graphic designer to design the icon and once you are happy with it the designer will produce rasterised versions for all the required sizes and colour depths, typically in a single .ico file.

Find logo in desktop screenshot

I need to develop a desktop application which will
1.) have a list of the Different Application logos (Background Transparent) e.g. IE, FIREFOX, CHROME, PHOTOSHOP ETC.
2.) User will take a screenshot of desktop and save the image.
3.) Now my application need to search all the logos in the screenshot image and tell which all logos are present and where.
4.) I used OPENCV, it's working, but when user changes the desktop background & captures screenshot, it's not working as the transparent area of logo is getting the desktop background content.
Can somebody provide a solution or libraries open source, commercial to do this job.
This is easy to do using cross-correlation.
See my answer to this question.
Basically:
Start with desktop image and one template image for each icon
Apply edge detection (e.g. Sobel) to the desktop image and template images.
Throw away the original desktop image and templates, you won't need them anymore cause we'll be using the edge-detected images
For each template
Do template matching as you normally would
Threshold the maximum of the result. If it's above the threshold, you have a match at that position. Otherwise, no match.
If your icons are aligned in a grid on the desktop, you may be able to speed up your processing by only checking those specific grid positions.
EDIT
You can also save a lot of time by knowing which icons to search for. If you have access to the file system, then just look for *.lnk files (or any other extensions you may be interested in) in the directory that corresponds to the desktop (can't remember exactly what it is, but for Windows7 it's something like c:\users\misha\desktop). That will tell you what icons are there on the desktop. This will allow you to shorten your template candidate list before you go and do the template matching.
I like misha's answer and I think it should work for you. But it that doesn't work you could try replacing the transparant pixels in your reference logo with uniformly distributed random noise before trying the match. This will make the transparant pixels irrelevant for any matching computation because they will match just as bad no matter what there is on the desktop in those pixels.
I'm not familiar with the tools you're using, but I'm guessing you have to either:
a) Tell your program to ignore transparent pixels in the icon images during the comparison operation.
OR
b) Tell your program to treat transparent pixels in the icon images as "wildcards" which can be any color.

Resources