FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse - Bitmap - JPG
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
xBrowse - Bitmap - JPG
Posted: Mon Sep 10, 2007 08:43 PM

Hello,

I saw an example to use BMP files in a xBrowse()

Is it also possible to use JPG files.

Thanks,

Willy

Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
xBrowse - Bitmap - JPG
Posted: Tue Sep 11, 2007 03:04 AM

It's not possible, image for using in browses (any kind) should be always BMPs in files or resources.

Saludos

R.F.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Bitmap - JPG
Posted: Tue Sep 11, 2007 06:12 AM

Willy,

You have to use a TImage object that reads the JPG and convert it into a BMP automatically in memory.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
xBrowse - Bitmap - JPG
Posted: Tue Sep 11, 2007 07:22 AM

Thanks,

Is there an example.

Greetings,

Willy.

Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
xBrowse - Bitmap - JPG
Posted: Wed Sep 12, 2007 07:59 AM

Therefore I should have to change the txBrowse class.

However this is a complex situation I will give it a try.

Any tips how to start this ?

Thanks,

Willy

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
xBrowse - Bitmap - JPG
Posted: Thu Sep 13, 2007 10:11 AM
Willy,

Try this:
METHOD AddJpgFile( cJpgFile ) CLASS TXBrwColumn

   local hBmp := FILoadImg( cJpgFile )

   AAdd( ::aBitmaps, { hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ) } )

return .t.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
xBrowse - Bitmap - JPG
Posted: Thu Sep 13, 2007 10:44 AM

Thanks Antonio,

I test this as soon as possible

Willy

Posts: 117
Joined: Thu Mar 02, 2006 11:06 AM
xBrowse - Bitmap - JPG
Posted: Fri Sep 14, 2007 12:23 PM

At this momoent it is already possible to browse JPG files in a xBrowse()

But it only works when there is only 1 dataline. Is it possible with xBrowse to combine bitmaps and multiple datalines.

The JPG is not displayed in the middel of the column. When I give the column the exact width it is not displayed completely.

Thanks

Willy

Continue the discussion