Friday, November 25, 2005

Lazy.. Lazy...

Well.. lets say it... I am very lazy :-) Since about a month or er.. more I haven't token care of my blog.. since I started this blog (about a year ago) not many delphi specific posts had been introduced here.. but that's live... :-) In fact I have been always like that.. I start something with great entusiasm and after a couple of weeks I loose illusion... but I still got a spark of it for my blog. Anyway I think I am writting this for my own as probably only Gloria and William read this lines. Hello Gloria, Hello William.. howdy ? :-))))))).
This last months I have been visiting many blogs and the borland newsgroups, and I see how complicated this world of Delphi is, but I keep on working and doing what I like.
This last times I was deciding about a change of the Image format that I use at my projects, as for me bmp is so simple and weighty, at the UI and so.
Since long time ago, I got bookmarked, a website from an excellent Delphi Coder Mike Lischke.He is the producer of the GraphicEx Library. When you install this library Delphi can read many,many new image formarts (PSD,GIF,TIFF,PNG) althought with some limitations in some formats, it is awesome. So I started testing this for some time using the GIF format, as it produces small files and it's transparency works perfectly in Delphi. After some tests and feelling satisfied I started implementing the GIF format to all my projects and I shorted the size of some projects about 2 or 3 megs. Great !
Well... after some time I played with the PNG format. This format is really a beast, as it accepts 16million colors (not as gif wich is limited to 256), it accepts transparency, and.. and... Alpha blending. OOOOhh... alpha blending... this is a blaster... but GraphicEx does not support the Alpha Blending feature in the PNG format, so I looked around the net, googleing, and found this page: http://pngdelphi.sourceforge.net/ Ohh... what a sweet think... when I installed the source and tryed a PNG image... my eyes started to cry.. what a beatifull think.. look.. look how pretty the thinks could look like with a Alpha blended Image:

This is an Image of a Form in Design mode using three png images from Foood's, a great Icon producer.













PNG files, if you don't abuse, are a bit large than gif's but much shorter than bmps with transparency and alphablending, so I decided to change it all to PNG.. Now coding being able to use those PNG images is just fun. I really recomend it to everyone. Well I only wanted to drop some few words and got out a little article. And for the end, and knowing how I am (as my posts are countend monthly :-)) ... I wish you Merry Christmas and a Happy New Year 2006 in advance, and at least a happy Delphi 2006 wich is arround the corner.