Mostrar imágen desde GOOGLE DRIVE

Mostrar imágen desde GOOGLE DRIVE

Postby acuellar » Thu Jul 29, 2021 3:16 pm

Buenas estimados

Necesito mostrar imágenes almacenadas en GOOGLE DRIVE
Hago lo siguiente y no muestra nada :wink:
Code: Select all  Expand view

  cNomImg:="http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"
    oPoster:SetBmp(cNomImg)

 @83,70 BITMAP oPoster SIZE 290,400 PIXEL OF oWnd  NOBORDER CENTER ROUNDED ADJUST

 


Gracias por la ayuda
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1625
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Thu Jul 29, 2021 3:41 pm

Adhemar, intente con este también:

https://imgur.com/

Haga un teste.

Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby acuellar » Thu Jul 29, 2021 8:17 pm

Gracias João

Funciona con Imgur

Pero quisiera hacerlo con GOOGLE DRIVE por es mas práctico y seguro.

Quizás alguien lo ha logrado.
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1625
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Mostrar imágen desde GOOGLE DRIVE

Postby cnavarro » Fri Jul 30, 2021 2:01 am

acuellar wrote:Buenas estimados

Necesito mostrar imágenes almacenadas en GOOGLE DRIVE
Hago lo siguiente y no muestra nada :wink:
Code: Select all  Expand view

  cNomImg:="http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"
    oPoster:SetBmp(cNomImg)

 @83,70 BITMAP oPoster SIZE 290,400 PIXEL OF oWnd  NOBORDER CENTER ROUNDED ADJUST

 


Gracias por la ayuda


Prueba asi
Code: Select all  Expand view

  cNomImg:="http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"
 @83,70 BITMAP oPoster SIZE 290,400 PIXEL OF oWnd  NOBORDER CENTER ROUNDED ADJUST
    oPoster:SetBmp(cNomImg)
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Mostrar imágen desde GOOGLE DRIVE

Postby acuellar » Fri Jul 30, 2021 12:42 pm

Gracias Estimado Cristobal

No funciona.
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1625
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Fri Jul 30, 2021 3:40 pm

Code: Select all  Expand view

// \samples\ADHEMAR2.PRG - 30/07/2021 - kapiabafwh@gmail.com

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL oWnd, aBmp, oFont
   LOCAL cUrl         := "https://i.imgur.com/teS9kHy.png"
   // google drive no funciona, porque no tiene extension.
   LOCAL cCorinthians := "https://drive.google.com/file/d/1YHX2ragWXF1wC08Zuax1-SNZMA3Rm0GK/view?usp=sharing"
   LOCAL cFalhaFive   := "https://drive.google.com/file/d/0B81trAa2AvzUYzRwRmR3angyQnY4SU15dV9JOEFaZ0RoYkVz/view?usp=sharing&resourcekey=0-VlhYhG3Ym3n9EOdcXFno7A"
   LOCAL cAcuellar    := "http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0, -16

   DEFINE WINDOW oWnd TITLE "BITMAPS LINKED TO URL"

   oWnd:SetFont( oFont )

   DEFINE BUTTONBAR oWnd:oBar OF ownd SIZE 64,80 2015

   oWnd:oBar:bPainted := { || oWnd:oBar:SayText( ;
      "All Images" + CRLF + "are directly" + CRLF + "from URL Links", ;
      { nil, nil, nil, -20 }, "R" ) }

   DEFINE BUTTON OF oWnd:oBar PROMPT "Timao" ;
      ACTION( ShellExecute(GetActiveWindow(),"open",'"'+cCorinthians+'"') )

   DEFINE BUTTON OF oWnd:oBar PROMPT "Fivedit" ;
      ACTION( ShellExecute(GetActiveWindow(),"open",'"'+cFalhaFive+'"') )

   DEFINE BUTTON OF oWnd:oBar PROMPT "Acuellar" ;
      ACTION( ShellExecute(GetActiveWindow(),"open",'"'+cAcuellar+'"') )

   aBmp  := oWnd:ReadImage( cUrl )

   oWnd:nHeight := 600
   oWnd:nWidth  := 700

   ACTIVATE WINDOW oWnd CENTERED ;
      ON PAINT oWnd:DrawImage( aBmp, { oWnd:oBar:nHeight,nil,nil,nil } )

   RELEASE FONT oFont

   PalBmpFree( aBmp )

   oFont:End()

RETURN NIL

// fin / end
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby acuellar » Fri Jul 30, 2021 5:56 pm

Muchas gracias estimado João por tu tiempo

Seguiré intentando.
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1625
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Fri Jul 30, 2021 6:40 pm

acuellar wrote:Muchas gracias estimado João por tu tiempo

Seguiré intentando.


Mi caro amigo Adhemar, imgur.com és totalmente seguro. uso a mucho tiempo. No tengo nada a decir de mal sobre imgur.com.

Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby acuellar » Fri Jul 30, 2021 9:28 pm

Muchas gracias Estimado João

Por la sugerencia.

Lo haré con IMGUR
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1625
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Mostrar imágen desde GOOGLE DRIVE

Postby cnavarro » Fri Jul 30, 2021 10:45 pm

Adhemar, con el código que te he puesto, a mí me funciona perfectamente
La imagen que pones es de una pelicula?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Fri Jul 30, 2021 11:53 pm

cnavarro wrote:Adhemar, con el código que te he puesto, a mí me funciona perfectamente
La imagen que pones es de una pelicula?


Master Navarro, porfa, podrias poner un ejemplo completo para testes? Con el link de tu imagen? BMP, JPG ó PNG?

Gracias, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby cnavarro » Sat Jul 31, 2021 2:10 am

Joao, aqui lo tienes
Code: Select all  Expand view

#include "Fivewin.ch"
#include "colores.ch"

Static oWindow
Static oBar
Static oFont
Static oFont2
Static oFont3
Static oFont4

Static nCP
Static nW

Function Main()

   DEFINE FONT oFont  NAME "TAHOMA" SIZE 0,-11
   DEFINE FONT oFont2 NAME "TAHOMA" SIZE 0,-16
   DEFINE FONT oFont3 NAME "CALIBRI" SIZE 0,-20
   DEFINE FONT oFont4 NAME "CALIBRI" SIZE 0,-14

   TestFldEx()

   RELEASE oFont
   RELEASE oFont2
   RELEASE oFont3
   RELEASE oFont4

Return nil

//----------------------------------------------------------------------------//

Function TestFldEx()

   local oSay5
   local oSay6
   local nClrL   := Rgb( 0, 188, 142 )
   local oFld12
   local oPoster
   local cNomImg

   DEFINE WINDOW oWindow FROM 20, 20 TO GetSysMetrics( 1 ) - 60, 1120 ;
      PIXEL TITLE "Test Panels and FolderEx" ;
      MENU MyMenu();
      COLOR CLR_BLACK, Rgb( 224, 224, 224 )
      oWindow:SetFont( oFont )

      @ 1, 10 FOLDEREX oFld12 ;
         PROMPTS "PRUEBA DE FOLDER", "OTRAS", "CONEXIONES RECIENTES" ; //, "CONEXIONES GUARDADAS", "CONEXIONES" PIXEL ;
         OF oWindow SIZE 600, 600 ; //TRANSPARENT ;
         FONT oFont4 COLOR CLR_WHITE //LEFT
   
      WITH OBJECT oFld12
         //:lNewPaint      := .T.
         :nFolderHeight  := 24
         :nRound         := 0
         :nSeparator     := 0
         :aGradSel       := { { 1, CLR_WHITE, CLR_WHITE } }
         :aGradUnSel     := { { 1, CLR_WHITE, CLR_WHITE } }
         :bClrText       := { | o, n | if( n = o:nOption, ;
                              METRO_GRIS2, Rgb( 184, 184, 184 ) ) }
         :aGradOver      := { { 0.8, CLR_WHITE, CLR_WHITE }, { 0.2, nClrL, nClrL } }
         :aGradOverUnSel := :aGradOver
         :bChange        := { || .F. }
         //:AdjClient()
         //:Refresh()
//         :nFolderWidth   := 128
         :Default()
//         :aDialogs[ 1 ]:bValid := { || .F. }
      END

      @ 0, 10 SAY oSay5 PROMPT "Esto es un Folder Pestaña 1" OF oFld12:aDialogs[ 1 ] ;
         SIZE 250, 32 PIXEL ;
         FONT oFont2 /*TRANSPARENT*/ VCENTER COLOR Rgb( 128, 128, 128 )

    cNomImg:="http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"
    @ 83,70 BITMAP oPoster SIZE 290,400 PIXEL OF oFld12:aDialogs[ 1 ]  NOBORDER ADJUST // CENTER ROUNDED
    oPoster:SetBmp(cNomImg)

      @ 5, 10 SAY oSay6 PROMPT "Esto es un Folder Pestaña 2" OF oFld12:aDialogs[ 2 ] ;
         SIZE 250, 32 PIXEL ;
         FONT oFont2 /*TRANSPARENT*/ VCENTER COLOR Rgb( 128, 128, 128 )

   ACTIVATE WINDOW oWindow ;
      VALID ( .T. )

Return nil

//----------------------------------------------------------------------------//

Function MyMenu()

   Local oMnu
   MENU oMnu
      MENUITEM FwString( "Acciones" )
      MENUITEM FwString( "Editar" )
      MENUITEM FwString( "Ver" )
      MENUITEM FwString( "Ayuda" )
   ENDMENU

Return oMnu

//----------------------------------------------------------------------------//

 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6520
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Sat Jul 31, 2021 1:20 pm

Gracias Master. Con FOLDEREX funciona. Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby karinha » Sat Jul 31, 2021 1:47 pm

Perfecto Maestro Navarro.

Code: Select all  Expand view

// \SAMPLES\TESTIMG3.PRG

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oImg, cNomImg

   cNomImg := "http://drive.google.com/uc?export=view&id=10an-18yRqOyRljuIWZ2-OKXADIDoWrG-"
   
   DEFINE DIALOG oDlg TITLE "Image Google Drive"

   @ 0, 0 BITMAP oImg SIZE 250, 350 PIXEL OF oDlg NOBORDER ADJUST

   oImg:SetBmp( cNomImg )

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT ( oDlg:SetSize( oImg:nWidth, oImg:nHeight ), oDlg:Center() )

   oImg:End()

RETURN NIL
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7578
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Mostrar imágen desde GOOGLE DRIVE

Postby cmsoft » Sat Jul 31, 2021 1:55 pm

Desde que version de FW funciona esta opcion?
Porque a mi no me funciona.
Tengo la 16.06
User avatar
cmsoft
 
Posts: 1257
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], wilsongamboa and 71 guests