Jump to content

spectorius

Newbies
  • Posts

    6
  • Joined

  • Last visited

spectorius's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. For me it is easy I ported Reduce Noise and Brightness & Contrast Adjustment effects to PHP, now trying Pencil Sketch
  2. my time is over midnight already (1:18 am) if (intensity + this.brightness < 128) { this.rgbTable[intensity] = 0; } else { this.rgbTable[intensity] = 255; } into this.rgbTable[intensity] = (intensity + this.brightness < 128) ? 0 : 255; p.s. i like simplicity very match
  3. Actually, by performance it is the same, cause behind max and min there are same if else.
  4. public static byte ClampToByte(double x) { if (x > 255) { return 255; } else if (x < 0) { return 0; } else { return (byte)x; } } another thing. i think the next code is some better :wink: public static byte ClampToByte(double x) { return (byte)Math.Min(Math.Max(x, 0), 255); } Why this line was there? Is it a part of the algorithm ? ANd, where i can read about used algoritm for Reduce Noise Effect. Thanks :wink:
  5. Just a plain old negative sign... So, It`s mean -1 * Math.Min() ?
  6. int maxArea = GetMaxAreaForRadius(rad); Hi! What is the point of this line??? Var maxArea is not used anywhere. file: LocalHistogramEffect.cs line: 161; function: RenderRect And, BTW, what is minus in: int top = -Math.Min(rad, y); -1 * Math.Min ? Thanks! 8)
×
×
  • Create New...