Tag Archives: Graphics

New component TrkSliderEdit

Showing rkSliderEdits with different colors

Some color alternatives

TrkSliderEdit in all its glory.

This component will make it a lot easier to handle input values. A slider, an edit and a label, all, in one component. It could not be any easier that this. Well that’s my opinion. I use this component in my photo edit program a lot and it saved me a lot of time. Maybe it can help you to.

Use arrow keys to step value up or down by one or page up/down to step value in steps of ten. Press space key to enter value or press mouse button in edit area. Mouse click in the slider area will move the slider to the new position.

I hope you find this component interesting and useful.

If you have any comments or suggestions give me a word.

Download source code and demo

My curves tool

A image showing the Curves tool in action

Curves tool in action


This is my curves tool. Inspired by the curves tool in Photoshop and Gimp. It keeps a list of presets which is located in a folder “curves” in the application folder. All files in this folder is .ACV files which is standard Adobe curve files. When you add a curve to the preset it saves the curve to the “curves” folder.

This project was updated 02.04.2015. When clicking outside the grid, or at an horizontal value where it already exists a point, it would give an error. This has now been corrected.

Download project source and executable

Hope you find this tool useful.

This is just a demo and not a complete application I think of it as a curves preview dialog.

Tiltshift in Delphi

PicTiltShift

Two simple programs for making tiltshift pictures in Delphi. A lot of improvements potential but it give you a starting point.

Not every image is suited for this effect, but that you will see very fast. Images with lots of sky or water usually do not work very well. City or landscape images might work out quite well. Do experiment.

I hope you like it and find it useful. The code is quite small. My biggest challenge was to build the gui in second sample (tilt shift 2)

Download code and exe (927kB)

VistaProBar updated to version 1.7

VistaProBar in use

New VistaProBar "style"

This is a small update were I only have added three properties: BackColor, BorderColor, CornerColor.

I think this makes it a little more useful. I needed the properties to get my music progress bar.I think it looks good.

Have fun.

Download rkVistaProBar from download page. Collection not updated yet.

Updated VistaProBar

Demo VistaProBar 1.5

Demo of VistaProBar 1.5

VistaProBar has now been updated to version 1.5.
Now supports marquee mode.

New settings are:

MarqueeMode: Marquee on or off
MarqueeSize: Percent used for marquee
MarqueeFade: Percent that should be used for fading the marquee 1..50
MarqueeSpeed: Timer speed setting

Hope you find it usefull.

Download updated component and demo

Adjust brightness, contrast and saturation ++

Adjust image demo

Adjust image demo

I have just uploaded a small demo of how to adjust brightness, contrast and saturation of an image. There are also two other usefull samples included in the demo. One is the auto adjustment setting (using histogram stretching) the other one is an exposure control, perfect for adjusting (lighten) dark pictures.

Hope you find it usefull and if you have some better ideas why not share em. These routines are based on a combination of my own and others ideas and source code.

Download: Project with Source

Showing thumbnails part #2

In part one I showed you how to show thumbnails in one predefined size, now it is time to take it to the next level. I show you how to make realtime resizable thumbnails.

Thumbs demo

Screenshot of thumbnails demo

The trick to make it work is to use an additional  list of bitmap thumbnails. Thumbnails is still kept as jpegs in the items list. The diffrence between previus version and this one is that when rendred to screen they are converted to bitmaps and cached in a bitmap list. This makes screen update faster and more pleasent.

I use a cache size of one point five the screensize but you can set it to whatever you want.

rkView has been updated so it is recommended that you recompile the package where you installed the rkView.

Enough said download the code and see for yourself. Enjoy and have fun!

Download: Thumbnails demo

Showing thumbnails part #1

I have split the thumbnail project into to parts. In part one, this one,  I will show you how to view thumbnails the easy way using rkView.

rkView is just like a virtual grid view, no data is stored inside it.  rkView was made to ease the task of viewing tumbnails but are not in any way limited to this task.  I also use this component as a ownerdraw listview. So go ahead an install this component (it is included in the download).

Screenshot of Thumbs demo

Screenshot of thumbnails demo

Showing thumbnails using rkView is an easy task all we need is a list of thumbnails and some code to draw it. rkView will call the ‘OnCellPaint’ event for each cell, giving us a canvas to paint on.

In this demo I have chosen to store the thumbnails as jpeg since it occupies less space than using bitmaps.

Well it is time to download and run the code.

Download: Thumbnails demo

How do you straighten an image in Delphi?

I have always wondred of how they do this magic… straighten an image that is. Well as it turns out, no magical skills is needed. All that is needed is to crop the rotated image.

One question, I have not found a fully acceptable answear to yet, is how to calculate this area. My solution uses the four rotated corners of the image. This works and is acceptable but it loses more than needed of the image when the angle increases.

Image straighten demo

I have included a demo project that shows my solution. Do take a look at it and if you find any bugs or improve it in any way, I would love to hear about it.

Download: Demo including source

A little delayed but still here!

While we are waiting for my entries I can say a little about what I have planed. The first artickel will be about image straightening. I have a working solution but I am not complete satisfied so maybe we can improve it together. I will always be open for suggestions about improvements and better way of doing stuff. I am not claiming to be a pro and lot of my solution will be based on what others have contributed.

Recently I have done some gradient variants I would like to share with you so keep on coming back. Have you ever wanted to include resizable thumbnails in your application? I have a solution and I will share it with you. It was a lot easier than I had imagined so there is no excuse for not adding it any longer… well untill you have read my artickel that is.

Working with colors have always been a little difficult and I have had to ask around sometimes. This has given me some good solutions and I planning to show you my solutions. 

This is a little about what is comming.  I hope you find it intresting and if you have any comments please tell me.

My idea of this site is to be a helping hand in graphics programming in Delphi. Finding solutions and contribute to finding solutions that  works.

 

Kind regards

Roy Magne Klever