XIMAGE : Gamma Level Adjustment

XIMAGE : Gamma Level Adjustment

Postby nageswaragunupudi » Mon Jul 08, 2024 2:41 pm

Upcoming Enhancement to TXImage class:

New Data nGamma. Default value 1.0
Programmer can assign any value 0.0 or greater to change the Gamma value.

Image

Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg, oImage, oFont, cFile
   local oGamma, nGamma  := 100.0, oSay

   cFile := "..\bitmaps\olga1.jpg"

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 600,800 PIXEL TRUEPIXEL RESIZABLE FONT oFont ;
      TITLE Upper( cFileName( cFile ) )

   @ 60,20 XIMAGE oImage FILE cfile SIZE -20,-20 OF oDlg
   oImage:FitRect()

   @ 10,20 SAY "Gamma" SIZE 100,20 PIXEL OF oDlg

   @ 10,120 SLIDER oGamma VAR nGamma SIZE oDlg:nWidth - 260,20 PIXEL OF oDlg ;
      HORIZONTAL RANGE 0,300 UPDATE TOP DIRECTION ;
      ON CHANGE ( oImage:nGamma :=  nVar * 0.01, oDlg:Update() ) ;
      ON THUMBPOS ( nGamma := nVar, oImage:nGamma := nVar * 0.01, oDlg:Update() ) ;
      SLIMSTYLE

   @ 10,oDlg:nWidth - 120 SAY oSay PROMPT { || oImage:nGamma } PICTURE "9.9999" SIZE 100,20 PIXEL OF oDlg RIGHT UPDATE

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: XIMAGE : Gamma Level Adjustment

Postby cmsoft » Mon Jul 08, 2024 2:54 pm

Excelente trabajo Mr. Rao!!
Muchas gracias!
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: XIMAGE : Gamma Level Adjustment

Postby Antonio Linares » Mon Jul 08, 2024 4:59 pm

Dear Rao, excellent work as usual.

thank you very much!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: XIMAGE : Gamma Level Adjustment

Postby Armando » Tue Jul 09, 2024 12:10 am

Mr. Rao:

Excellent work, congratulations

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3201
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: XIMAGE : Gamma Level Adjustment & More : Updated

Postby nageswaragunupudi » Fri Jul 12, 2024 1:40 pm

Varying
Gamma, Brightness, Contrast, AlphaLevel, Blurr and Toggling Gray

Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: XIMAGE : Gamma Level Adjustment

Postby Antonio Linares » Fri Jul 12, 2024 3:27 pm

Great work!

Many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: XIMAGE : Gamma Level Adjustment

Postby RAMESHBABU » Sat Jul 13, 2024 1:10 am

Dear Nageswara Rao gaaru,

Thank you for your additions to xImage Class for Image Editing.

It is a great help to me to completely avoid using FreeImage.dll wrapper
function for Image editing.

The following is my Image editing dialog which is almost similar to your
functionality.

Image

Thank you once again.

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests