• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

GDIplus - brightness

Started by Edwin Knoppert, October 17, 2011, 12:19:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Edwin Knoppert

Yes i seen it, only thing is that the scale/scope differs from the gdiplus effects -1/1 vs -255/255
I have the feeling that a float can not reach the same potential this way (?)

Patrice Terrier

Contrast

   // factor > 1.0f increases the contrast
   // 0.0f < factor < 1,0f decreases the contrast
   REAL factorT = 0.5f * (1.0f - factor);
   
   ColorMatrix colorMatrix =
   {
      factor,  0.0f,    0.0f,    0.0f, 0.0f,
      0.0f,    factor,  0.0f,    0.0f, 0.0f,
      0.0f,    0.0f,    factor,  0.0f, 0.0f,
      0.0f,    0.0f,    0.0f,    1.0f, 0.0f,
      factorT, factorT, factorT, 0.0f, 1.0f
   };
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Edwin Knoppert

Somewhere this week i'll continue on this.
I have some other projects interfering :)

Thanks,

Edwin Knoppert

Btw, i was using a trackbar but does not seem to accept negative ranges (-1 <> 1)
I shifted it to positive values but the tracking tooltip shows those values as well.
I wonder if i can use negative values or customly set the value in the tooltip.

Last resort would be to prepare a tracking tooltip from scratch.