Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating rich UI based on PNG images

How do I create rich UI in Delphi when I'm having set of PNG images provided? I need to "skin" the buttons / panels / page controls with PNG images. PNG transparency must be supported. Any components / solutions?

to make things clear: I'm not asking for typical "skinning" solution, nor for PNG support in delphi7. Rather for a solution / component set / library which contains basic controls (buttons, page controls) with possibility to set the background image. Each element will have completely different image, so that is not about skinning.

like image 520
migajek Avatar asked Aug 12 '11 12:08

migajek


People also ask

Is PNG good for web?

Portable Network Graphics files (PNGs) are compressible and like JPEGS, can handle 16 million colors. They're mostly used for web graphics, logos, charts, and illustrations, rather than high-quality photographs, because they take up more storage space than JPEGs.

What is a good PNG number?

As a result, PNG 8 is best utilized in small graphics that do not require much color detail, such as computer icons and simple graphic images. PNG 24 works best for web photos and more detailed images.

Is PNG larger than JPEG?

The full-size PNG has a file size of 402KB, but the full-sized, compressed JPEG is only 35.7KB. JPEG works better for this image, because JPEG compression was made for photographic images. The compression still works for simple-color images, but the loss of quality is far more noticeable.


2 Answers

You'll have a very hard time doing this in Delphi 7. The latest versions of Delphi have excellent support for PNG including transparency. I know it's not a simple answer to your question but I think it would be the best solution.

like image 190
David Heffernan Avatar answered Oct 12 '22 03:10

David Heffernan


I had been using TPngComponents since Delphi 7. That provide very good png support for most of the delphi build-in / third party components. Embarcadero had purchased another well know Open Sources PNG Supporting component know as TPngImage and build into Delphi's native graphic support in later Delphi versions. However, the native png support seems harder to use and had more problems. Notice that some components do not support the transparency so you have to do some test yourselves.

With a fast search, I had not yet find the original package but find a newer modified package mainly for Delphi 2009/2010 but mentioned "should be compatible downto Delphi 7"

I myself am using that version now in Delphi 2010.

edit : Thanks for Uwe Rabbee for pointing out the product Codegear (now Embarcadero) purchased was another component TPngImage rather then the TPngComponent in This Post

like image 23
Justmade Avatar answered Oct 12 '22 03:10

Justmade