Problemas con IMAGE

Problemas con IMAGE

Postby maecmx » Mon Nov 28, 2005 5: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
maecmx
 
Posts: 19
Joined: Fri Nov 11, 2005 8:12 pm
Location: Guadalajara, Jalisco Mexico

Postby Antonio Linares » Mon Nov 28, 2005 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42149
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problemas con IMAGE

Postby goosfancito » Fri Dec 13, 2019 1: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/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 49 guests

cron