Limitation on TImage / FreeImage ?

Post Reply
User avatar
Carles
Posts: 937
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Contact:

Limitation on TImage / FreeImage ?

Post by Carles »

Hello,

I have a problem when I load more than 2/3 jpg in the same dialog. Anybody solved it ? Example for test:


Code: Select all

#include "FiveWin.ch" 
#include "Image.ch" 

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

function Main() 

   LOCAL oDlg, oImage1, oImage2, oImage3, oImage4, oImage5, oImage6 
   LOCAL cFile := cGetFile( curdrive() + ':\' + CurDir() + '\*.jpg' ) 

   DEFINE DIALOG oDlg FROM 0, 0 TO 39, 50 ; 
      TITLE FWDESCRIPTION + " JPG,JIF,GIF,BMP,DIB,RLE,TGA,PCX support!" 

     @ 0 ,  0  IMAGE oImage1 FILE cFile SIZE 100, 100 OF oDlg ADJUST 
     @ 7 ,  0  IMAGE oImage2 FILE cFile SIZE 100, 100 OF oDlg ADJUST 
     @ 14,  0  IMAGE oImage3 FILE cFile SIZE 100, 100 OF oDlg ADJUST 
     @ 0 , 12  IMAGE oImage4 FILE cFile SIZE 100, 100 OF oDlg ADJUST 
     @ 7 , 12  IMAGE oImage5 FILE cFile SIZE 100, 100 OF oDlg ADJUST 
     @ 14, 12  IMAGE oImage6 FILE cFile SIZE 100, 100 OF oDlg ADJUST 


     oDlg:bStart := MsgInfo( 'oImage1:hBitmap ' + str( oImage1:hBitmap ) + CRLF + ; 
                             'oImage2:hBitmap ' + str( oImage2:hBitmap ) + CRLF + ; 
                             'oImage3:hBitmap ' + str( oImage3:hBitmap ) + CRLF + ; 
                             'oImage4:hBitmap ' + str( oImage4:hBitmap ) + CRLF + ; 
                             'oImage5:hBitmap ' + str( oImage5:hBitmap ) + CRLF + ; 
                             'oImage6:hBitmap ' + str( oImage6:hBitmap ) ) 

   ACTIVATE DIALOG oDlg CENTER ; 


return nil
Thanks.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
User avatar
Carles
Posts: 937
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Contact:

Post by Carles »

Enrico,

Thanks for your test. I don't now that happen me. I wil try in other machines.

Thanks
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Check also if you are using a recent FreeImage.dll release (I'm using 391 that is not the latest).

EMG
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

Carles:

Con la Image basada en la NIVEWLIB DLL (nativa de FiveWin) nosotros teniamos el problema de la velocidad de carga de las imagenes, era demasiado lenta.

Nos movimos a FREEIMAGE de EMG y ahora el programa funciona muy rapido en la carga de las imagenes.
Saludos
R.F.
fleal
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

¿Dnde?

Post by fleal »

Rene,
¿Y donde está esa freeimage de EMG?

Gracias
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ¿Dnde?

Post by Enrico Maria Giordano »

If you are using TImage class (or IMAGE command) then probably you already have it.

EMG
User avatar
Carles
Posts: 937
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Contact:

Post by Carles »

Hello,

I already have it resolved. It is that it controlled that ::hBitmap was > 0 and in fact it can be a negative value.

Regards.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
fleal
Posts: 234
Joined: Tue Oct 25, 2005 12:39 am
Location: México, DF

en efecto

Post by fleal »

Carles,
He estado recibiendo reportes de mis usuarios que hay veces que las imagenes no se cargan, no se ven. El ::hBitmap regresa un número positivo o negativo.
Por favor podrías explicarme como lo has solucionado.

if oImage:hBitmap == 0
?"No se cargo la imagen"
// ¿Qué se puede hacer?
endif


Gracias

Fernando
México
Post Reply