FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBuilder and SaveToBMP() issue
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
xBuilder and SaveToBMP() issue
Posted: Fri Apr 16, 2010 07:08 PM
Please See below a sample that is working fine with Harbour + Fivewin and
xHarbour (free version) + Fivewin. But is not working with xBuilder (xHarbour commercial version) + Fivewin. I mean the file BMP is created but cannot be open when created thru xBuilder.

Code (fw): Select all Collapse
 #include "Fivewin.ch"
 #include "TGraph.ch"


FUNCTION MAIN()
    LOCAL oDlg, oGraph

    DEFINE DIALOG oDlg;
           SIZE 600, 500

    @ 1, 1 GRAPH oGraph;
           SIZE 250, 200;
           TYPE 1;
           YVALUES 3D XGRID YGRID XVALUES LEGENDS

    oGraph:aSeries = { { "Serie 1", CLR_CYAN , , },;
                       { "Serie 2", CLR_YELLOW, 2, .T. },;
                       { "Serie 3", CLR_HRED, 3, .F. } }

    oGraph:aData = { { 14280, 20420, 12870, 25347, 7640 },;
                     { 8350, 10315, 15870, 5347, 12340 },;
                     { 12345, -8945, 10560, 15600, 17610 } }

    oGraph:nClrX = CLR_GREEN
    oGraph:nClrY = CLR_RED

  @ 0, 0 BUTTON "Save2BMP" ACTION ( oGraph:Save2Bmp("GRAPH.BMP"), 
 msginfo("File GRAPH.BMP has been saved"))

    ACTIVATE DIALOG oDlg  CENTER

    RETURN NIL


Please can confirm this problem any of you that are using xBuilder?

Regards


George
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBuilder and SaveToBMP() issue
Posted: Fri Apr 16, 2010 09:20 PM

George,

Could you please provide both bitmaps (in a ZIP file) with the right and wrong ones ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: xBuilder and SaveToBMP() issue
Posted: Fri Apr 16, 2010 10:37 PM

Antonio,
Sent to your email.

Saludos

George

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBuilder and SaveToBMP() issue
Posted: Sat Apr 17, 2010 07:33 PM

George,

It seems as there are just two different bytes and they make the difference:

With Harbour: BM65 (first 4 bytes)

with xHarbour: MB65 (first 4 bytes)

I think we can easily fix this :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: xBuilder and SaveToBMP() issue
Posted: Sun Apr 18, 2010 02:41 PM

Good to know!

Thanks

George.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBuilder and SaveToBMP() issue
Posted: Fri May 07, 2010 10:05 PM

George,

Problem solved :-)

viewtopic.php?p=98298#p98298

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: xBuilder and SaveToBMP() issue
Posted: Fri May 07, 2010 11:23 PM

Very well.
I was following this thread.

Regards

George

Continue the discussion