FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Problemas con IMAGE
Posts: 19
Joined: Fri Nov 11, 2005 08:12 PM
Problemas con IMAGE
Posted: Mon Nov 28, 2005 05:18 PM

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

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problemas con IMAGE
Posted: Mon Nov 28, 2005 06:17 PM

Mario,

Envíame por email el RC de tu ejemplo y el PRG (ya de paso). Gracias.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: Problemas con IMAGE
Posted: Fri Dec 13, 2019 01:51 AM

hola
an mi caso no puedohacer andar que el control PICTURE que inserte desde pelles me muestre los scroll

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/

Continue the discussion