Antonio con el ejemplo que tienes de IMAGE funciona bien.
#include "FiveWin.ch"
#include "Image.ch"
//----------------------------------------------------------------------------//
function Main()
LOCAL oDlg, oImage
DEFINE DIALOG oDlg FROM 0, 0 TO 20, 60 ;
TITLE FWDESCRIPTION + " JPG,JIF,GIF,BMP,DIB,RLE,TGA,PCX support!"
@ 0, 0 IMAGE oImage SIZE 150, 150 OF oDlg SCROLL // ADJUST
oImage:Progress( .f. )
@ 1, 30 BUTTON "Select Image" SIZE 50,10 OF oDlg ACTION GetImage( oImage )
@ 2, 30 BUTTON "Print" SIZE 50,10 OF oDlg ACTION PrintImage( oImage )
@ 3, 30 BUTTON "Copy" SIZE 50, 10 OF oDlg ;
ACTION oImage:CopyToClipboard()
@ 4, 30 BUTTON "Paste" SIZE 50, 10 OF oDlg ;
ACTION ( oImage:LoadFromClipboard(), oImage:Refresh() )
@ 5, 30 BUTTON "Exit" SIZE 50, 10 OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTER
return nil
//----------------------------------------------------------------------------//
function GetImage( oImage )
local gcFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" + ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"All Files (*.*)| *.*" ;
,"Please select a image file", 4 )
if ! Empty( gcFile ) .and. File( gcFile )
oImage:LoadBmp( gcFile )
endif
return nil
no funciona.
Pero haciendo estos cambios ya no funciona no aparece la imagen solo con la clase FreeImage.
#include "FiveWin.ch"
#include "Image.ch"
//----------------------------------------------------------------------------//
function Main()
LOCAL oDlg, oImage, oBtn1, oBtn2,oBtn3,oBtn4,oBtn5
DEFINE DIALOG oDlg RESOURCE "DLG_WEBCAM_FOTO"
REDEFINE IMAGE oImage ID 108 OF oDlg SCROLL // ADJUST
oImage:Progress( .f. )
REDEFINE BUTTONBMP oBtn1 ID 100 OF oDlg BITMAP ".\BMPS\ACEPTAR16.BMP" ;
ACTION GetImage( oImage )
REDEFINE BUTTONBMP oBtn2 ID 101 OF oDlg BITMAP ".\BMPS\ACEPTAR16.BMP" ;
ACTION PrintImage( oImage )
REDEFINE BUTTONBMP oBtn3 ID 102 OF oDlg BITMAP ".\BMPS\ACEPTAR16.BMP" ;
ACTION oImage:CopyToClipboard()
REDEFINE BUTTONBMP oBtn4 ID 103 OF oDlg BITMAP ".\BMPS\ACEPTAR16.BMP" ;
ACTION ( oImage:LoadFromClipboard(), oImage:Refresh() )
REDEFINE BUTTONBMP oBtn5 ID 104 OF oDlg BITMAP ".\BMPS\ACEPTAR16.BMP" ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTER
return nil
//----------------------------------------------------------------------------//
function GetImage( oImage )
local gcFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" + ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"All Files (*.*)| *.*" ;
,"Please select a image file", 4 )
if ! Empty( gcFile ) .and. File( gcFile )
oImage:LoadBmp( gcFile )
endif
return nil
Muchas Gracias
Mario Espinosa