Author Topic: GDIplus - brightness  (Read 13056 times)

0 Members and 1 Guest are viewing this topic.

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
    • Hellobasic.com
Re: GDIplus - brightness
« Reply #15 on: October 30, 2011, 06:52:10 AM »
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 (?)

Offline Patrice Terrier

  • Hero Member
  • *****
  • Posts: 934
  • User-Rate: +62/-1
    • www.zapsolution.com
Re: GDIplus - brightness
« Reply #16 on: October 30, 2011, 09:00:47 AM »
Contrast
Code: [Select]
   // 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

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
    • Hellobasic.com
Re: GDIplus - brightness
« Reply #17 on: October 30, 2011, 12:25:42 PM »
Somewhere this week i'll continue on this.
I have some other projects interfering :)

Thanks,

Offline Edwin Knoppert

  • Sr. Member
  • ****
  • Posts: 254
  • User-Rate: +11/-4
    • Hellobasic.com
Re: GDIplus - brightness
« Reply #18 on: October 30, 2011, 12:31:42 PM »
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.