Jump to content
c0d3r

Images in High DPI, how?

Recommended Posts

@Anders Melander That is not an svg issue, it's a general problem. I solve this by trying multiple candidates on the smallest dimension I need and choose the best one. Or many times editing it to get the best out of it. For example, wrong dimensions defined in the SVG could result a blurry small image, meanwhile by adjusting it will give a crisp image etc... Nobody told you it's easy and fun! But it has to be made only once!

Share this post


Link to post
14 hours ago, c0d3r said:

I knew SVG, its great. But we were using PNGs all over the places in our major production, and no way you could find all these images in SVG.

You'd be surprised of the amount of SVG icons that can be found. 

https://www.flaticon.com/

  • Like 1

Share this post


Link to post
9 hours ago, Attila Kovacs said:

That is not an svg issue, it's a general problem.

That was pretty much the point of what I wrote; You can't just rescale an image (vector or raster) at run time and expect good results.

Share this post


Link to post
15 hours ago, c0d3r said:

Could be possible to have TPngImageList to be able to save selected PNG image to a file?

Currently not at design time (but a good feature request).

 

You can write a small program that does this:

  for I := 0 to PngImageList1.Count - 1 do
    PngImageList1.PngImages[I].PngImage.SaveToFile('Image' + I.ToString);

 

  • Like 1

Share this post


Link to post
4 hours ago, Anders Melander said:

You can't just rescale an image (vector or raster) at run time and expect good results.

as I mentioned, the scaling is upward and the actual size is about the same, so the vector image scaled will look even better, but maybe my eyes are not working properly and you are right or whatever, please try to convience me that i'm not just dumb but I can't see shit.

Share this post


Link to post
6 hours ago, Uwe Raabe said:

Currently not at design time (but a good feature request).

 

You can write a small program that does this:


  for I := 0 to PngImageList1.Count - 1 do
    PngImageList1.PngImages[I].PngImage.SaveToFile('Image' + I.ToString);

 

Appreciated.

Share this post


Link to post
7 hours ago, Lars Fosdal said:

You'd be surprised of the amount of SVG icons that can be found. 

https://www.flaticon.com/

Thanks for the link.  Unfortunately due to training issues,  we can't change any icons because our clients were all get used to them, thats one of the issues we were facing, otherwise we could get better modern icons to replace aged ones.  Clients are just ordinary people, some of them aren't smart enough.

Edited by c0d3r

Share this post


Link to post
18 hours ago, Vincent Parrett said:

I have had good results with Vector Magic - https://vectormagic.com/

 

The key though is having larger png's to work with. Converting a 16x16px png/bmp to svg is next to impossible as there just isn't enough detail to work with. 

 

FWIW, I'm slowly making my way through converting thousands of images to svg (either by converting or finding alternatives), it's mind numbingly boring and am losing the will to live..... 😒

Thanks for the link, I will try it out.

Share this post


Link to post
2 hours ago, Attila Kovacs said:

please try to convience me that i'm not just dumb but I can't see shit.

If it works for you then that's great. Why should I try to convince you otherwise.

Share this post


Link to post
On 12/19/2020 at 5:08 PM, c0d3r said:

Unfortunately due to training issues,  we can't change any icons because our clients were all get used to them

You don't need to change them. You just need new versions of your existing glyphs.. You'll need to hire a graphic designer. 

Share this post


Link to post
Guest

exist many packs pro of icons to developers... just google it and compare with yours and buy it.

Share this post


Link to post
5 hours ago, David Heffernan said:

You don't need to change them. You just need new versions of your existing glyphs.. You'll need to hire a graphic designer. 

A new version IS a change. 🙂   There are lots of people out there in NA don't like icons being changed even though they are out of date, particularly those ones in Heathcare sectors.  Dumb people all over the places,  we did got calls that ask  for where the any key is because the guys couldn't find the any key on the keyboard when they saw "Press any key to continue...'

Edited by c0d3r

Share this post


Link to post

A 4K display is also a change, but I can feel your pain. Maybe you could make it optional, to switch to a new icon set. Especially on HDPI.

Share this post


Link to post
8 minutes ago, c0d3r said:

A new version IS a change. 🙂   There are lots of people out there in NA don't like icons being changed even though they are out of date, particularly those ones in Heathcare sectors. 

If you can't change anything, I wonder what this topic is about. Is it a thought experiment? 

  • Haha 1

Share this post


Link to post
4 minutes ago, David Heffernan said:

If you can't change anything, I wonder what this topic is about. Is it a thought experiment? 

Because clients complaint that the icons won't get scaled properly, and they also don't want you change the icons when we discuss the issues with them.

Share this post


Link to post
12 minutes ago, Attila Kovacs said:

@c0d3r which windows do they have? Is there Per-App Scaling already available?

 

image.png.11ff4502d388ddb4cecf787b29026bef.png

image.png

image.png

We are using Per Monitor v2 in the latest release, and Yes, for now we have to set this 'Override high DPI scaling...' to System.  BUT it leads to blur screens which we got other complaints (LOTS LOTS of picky people out there, but we have to make them all happy) because of that.

Edited by c0d3r

Share this post


Link to post

Ok, I thought the Per-App scaling would be ok for the icons. However other things could be broken, like grids.

Edited by Attila Kovacs

Share this post


Link to post
27 minutes ago, c0d3r said:

Because clients complaint that the icons won't get scaled properly, and they also don't want you change the icons when we discuss the issues with them.

You seem to be wanting to change your program, but now you tell us that you can't change it. Seems like a waste of time. 

Share this post


Link to post
Guest

I stay here thinking if Coder worked at Embarcadero, who knows, it would be the happiness of all his clients!  😂


... who knows at Microsoft, who knows at Apple, who knows at all companies in the world!
This is what it is like to think about others before yourself!
 

Quote

Thanks God, paradise exists! - but nobody knows the way!  :classic_cheerleader:

 

Share this post


Link to post

They don't want change, but they get used to it. Then they will no longer want the old. Of course, the content should remain the same. Just like I'm used to new icons in many programs.

Share this post


Link to post
On 12/18/2020 at 8:10 PM, c0d3r said:

We were using 3rd party TPngImageList to store all PNGs. Do we have to prepare different set of Images in order to make images working under different High DPI? 

My current approach is to store all *.PNG files in high resolution inside the resources.  I scale them down to the appropriate size when the application starts and the display resolution is known. I use my own scaling routines (using a Lanczos2 filter) but there are lots of libraries that can do the same thing.  

 

This approach does not solve the situation of the user having multiple screens in multiple resolutions though.

  • Like 1

Share this post


Link to post
5 hours ago, A.M. Hoornweg said:

My current approach is to store all *.PNG files in high resolution inside the resources.  I scale them down to the appropriate size when the application starts and the display resolution is known. I use my own scaling routines (using a Lanczos2 filter) but there are lots of libraries that can do the same thing.  

 

This approach does not solve the situation of the user having multiple screens in multiple resolutions though.

Thanks for the tips. I will certainly try them out.

Share this post


Link to post
Guest

Have seen the "IconFontsImageList" and "SVGIconImageList"

Quote

Components:

  • IconFontsImageList is an extended ImageList for Delphi (VCL+FMX) to simplify use of Icon Fonts (resize, color, grayscale and more...)
  • IconFontsImage is an extended Image component for Delphi (VCL+FMX) to show any Icon Font directly or included into a an IconFontsImageList with all functionality (stretch, color, opacity, grayscale and more...)

https://raw.githubusercontent.com/EtheaDev/IconFontsImageList/master/Demo/Images/Sample.jpg

https://github.com/EtheaDev/IconFontsImageList

 

Three engines to render SVG (GDI+, Direct2D or Cairo) and four components to simplify use of SVG images (resize, fixedcolor, grayscale...)

https://raw.githubusercontent.com/EtheaDev/SVGIconImageList/master/Demo/Images/Sample.jpg

https://github.com/EtheaDev/SVGIconImageList/

hug

Edited by Guest

Share this post


Link to post

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

×