To give you an ad-free browsing experience, this website is completely funded by donations. If you use the information in this article to solve a problem, entertain yourself, or otherwise improve your life, please consider a small donation to help pay for server costs. (Even $1 helps!) Many thanks, and enjoy the site!

// Graphics Code

Real-time Image Curves (using cubic splines) in VB6

By request, here is the first of its kind in VB: a fast, accurate, real-time image curves dialog.  (This should be familiar to any PhotoShop users out there…)

Curves is similar in theory to both “Image Levels” and standard gamma correction, but it provides a much more powerful interface for adjusting the luminance of an image.  This project provides results very similar to Photoshop’s, and it allows the creation of more spline knots (32 instead of 16).  The cubic spline code on which I based my code was taken from Jason Bullen’s excellent “Simple Cubic Spline Curve Plot” (available at Planet Source Code).

The code is well-commented and very fast – please post comments, requests for future Photoshop-related code, and many heaps of praise (as this was a complicated routine to reverse-engineer…!).

Believe-it-or-not, this is a legitimate application of calculus.  Who knew such a thing existed? :)

 

bookmark and share this article

if you liked this article, you may also like

Discussion (Oldest Comments Displayed First)

Public comments are closed for this article. Private comments may be submitted using this link.

Comments are closed.