News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Zoom StretchBlt Darker Lighter Image

Started by FORTRANS, August 16, 2012, 12:37:52 AM

Previous topic - Next topic

FORTRANS

Hi,

   In the old forum, in a thread of the same name, dedndave
provided a link in Reply #3 to a discussion on gamma
correcting an image when resizing it.  My image resizing
program had large moire effects when resizing a test image
I made.  It is a checker board pattern of 0 and 255 pixels,
pixel wide lines, and so forth.

   So I wrote a gamma correction into my code based on
the discussion in "Jim Blinn's Corner:  Dirty Pixels".
And that reduced the moire patterns somewhat.  And it caused
the zoomed image to lighten.  I tried gamma curves at 1.8,
2.0, 2.2, and 2.5 generated by a spreadsheet.  The 2.0
curve was arguably the least flawed.

   So I wrote another program to measure my monitor.
Putting those values into the spreadsheet and trying to
fit a curve to them gave a value of about 1.9.  But it
also showed that the monitor didn't fit any curve all
that well.  And if I touch the brightness and contrast
it changes all the measurements anyway.  (And so of course,
that was the next thing I did...)  And I can't really tell
the difference from 2.0 all that much.

   Ah well, an interesting excursion Dave.  A good time
waster if nothing else.  It does help to show what Jim
was doing in his book with gamma correction though.
And, maybe, why one should do it.

Cheers,

Steve N.