- Tanner Helland (dot) Com - http://www.tannerhelland.com -

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

Posted By Tanner On December 24, 2008 @ 4:41 pm In Graphics Code | Comments Disabled

By request, here is the first of its kind in VB: a fast, accurate, real-time image curves dialog.

Curves is similar in theory to both “Image Levels [1]” 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 [2]).

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…!).


Article printed from Tanner Helland (dot) Com: http://www.tannerhelland.com

URL to article: http://www.tannerhelland.com/336/image-curves-vb6/

URLs in this post:

[1] Image Levels: http://www.tannerhelland.com/341/image-levels-vb6/

[2] available at Planet Source Code: http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=11488&lngWId=1

All text copyright © 2008 Tanner Helland. To reduce paper and ink usage, all comments, images, and videos have been suppressed on this printing.