Page 1 of 1
XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Mar 04, 2024 9:44 pm
by Marcelo Roggeri
Hola buenas tardes/noche a toda la comunidad FW estoy con el siguiente problema, necesito pegar (paste) en el control XImage no se si se puede una imagen copiada al portapapel (Clipboard). Lo tengo hecho pero buscando la imagen en disco y como hoy es muy cómodo para el usuario copiar y pegar quería saber si existe esa opción?
Desde ya muchas gracias y quedo a la espera.
Saludos desde Argentina.
Marcelo
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 7:30 am
by Antonio Linares
Estimado Marcelo,
La Clase TXImage proporciona el método Paste( lCheck ) que permite copiar una imagen desde el portapapeles
Además tienes el método PopupMenu( nRow, nCol, nFlags ) que te muestra un popup con la opción Paste
Espero que esto te pueda ser de ayuda
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 7:30 am
by nageswaragunupudi
Yes.
Set
- Code: Select all Expand view
oImage:lCanPaste := .t.
Later you can copy any image from any where and then in the RightClick menu select "Paste"
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 9:28 am
by nageswaragunupudi
Small sample
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oDlg, oImage
DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL RESIZABLE ;
TITLE "XIMAGE"
@ 0,0 XIMAGE oImage SOURCE "" SIZE 0,0 OF oDlg
oImage:lCanPaste := .t.
ACTIVATE DIALOG oDlg CENTERED
return nil
You can copy any image from the disk or other application or from web and paste.
You can also drag and drop any image file.
You can set external drop to .T. and then you can drag and drop any image from Web even
![Image](https://imagizer.imageshack.com/img924/8753/YD76D1.gif)
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 12:50 pm
by Marcelo Roggeri
Buenos dias Mr. Rao si efectivamente me anduvo logre hacerlo guardar la imagen tambien.
Gracias y saludos
Marcelo
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 12:57 pm
by Marcelo Roggeri
Gracias Antonio si si ahi logre hacerlo muchas gracias por la información.
Saludos
Marcelo
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 1:37 pm
by Marcelo Roggeri
Otra consulta con respecto a la imagen, cuando selecciono un archivo de imagen del disco, la imagen se guarda bien en la tabla, pero al momento de pegar la imagen me guarda la imagen en blanco.
Me esta faltando algo?
agregue esto antes de guardar la imagen
cArchivo:=curdrive()+":\"+curdir()+"\imagenes\foto.jpg"
oSelf:oImg:Save(.F.,cArchivo, 100)
lo guarda pero me da un alert de here P
y es molesto para el usuario final
Cualquier sugerencia les agradezco
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 3:11 pm
by nageswaragunupudi
1) What is your FWH version?
2) What is the alert you are getting?
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Mar 05, 2024 7:51 pm
by Marcelo Roggeri
Mr. RAO
Mi version corresponde a July 2021 to November 2021
y el alert ahi veo si lo pongo en una imagen y se la muestro
![Image](https://i.postimg.cc/CMNjdDdH/alertRAO.png)
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Mar 06, 2024 2:49 pm
by nageswaragunupudi
We regret the inconvenience.
While releasing 2111 we forgot to remove a trace we used for debugging.
Please open \fwh\source\function\imgtxtio.prg.
In the function FW_SaveImage() you please locate this code in Line No:2304
- Code: Select all Expand view
? "here",valtype( uimage ), nwidth,nheight
Please delete this line and include the modified "imgtxtio.prg" in you application.
Re: XIMAGE
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Mar 06, 2024 8:11 pm
by Marcelo Roggeri
Mr. RAO
Hecho ya lo hice y funciona ok.
Gracias Mr. RAO
Otra cosita en esta misma consulta, si es posible.
Las imagenes que guardo en la base de datos mysql las quiero leer desde php pero solo veo codigo binario.
Alguien tendra la forma de leerlo?
Gracias de antemano
Saludos
Marcelo