Bad quality with GIF (and GDI+)

Re: Bad quality with GIF (and GDI+)

Postby mastintin » Mon Nov 02, 2015 6:32 pm

yes , send me a email to mastintin_arroba_gmail_punto_com
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Mon Nov 02, 2015 6:35 pm

mastintin wrote:yes , my code c file for compare
https://www.dropbox.com/s/d9sk289eln9rl ... us4.c?dl=0


This is mine:

Code: Select all  Expand view
/*
 * Harbour 3.2.0dev (r1506171039)
 * Borland/Embarcadero C++ 7.0 (32-bit)
 * Generated C source from "gdiplus4.prg"
 */


#include "hbvmpub.h"
#include "hbinit.h"


HB_FUNC( MAIN );
HB_FUNC_EXTERN( TWINDOW );
HB_FUNC_EXTERN( TBUTTON );
HB_FUNC( OBMPLOADFROMFILE );
HB_FUNC_EXTERN( TBITMAP );
HB_FUNC_EXTERN( CGETFILE );
HB_FUNC_EXTERN( EMPTY );
HB_FUNC_EXTERN( GDIBMP );
HB_FUNC_EXTERN( PALBMPFREE );
HB_FUNC_EXTERN( FW_GT );
HB_FUNC_EXTERN( ERRORSYS );
HB_FUNC_INITSTATICS();


HB_INIT_SYMBOLS_BEGIN( hb_vm_SymbolInit_GDIPLUS4 )
{ "MAIN", {HB_FS_PUBLIC | HB_FS_FIRST | HB_FS_LOCAL}, {HB_FUNCNAME( MAIN )}, NULL },
{ "NEW", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "TWINDOW", {HB_FS_PUBLIC}, {HB_FUNCNAME( TWINDOW )}, NULL },
{ "TBUTTON", {HB_FS_PUBLIC}, {HB_FUNCNAME( TBUTTON )}, NULL },
{ "OBMPLOADFROMFILE", {HB_FS_PUBLIC | HB_FS_LOCAL}, {HB_FUNCNAME( OBMPLOADFROMFILE )}, NULL },
{ "END", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "TBITMAP", {HB_FS_PUBLIC}, {HB_FUNCNAME( TBITMAP )}, NULL },
{ "ACTIVATE", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BLCLICKED", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BRCLICKED", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BMOVED", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BRESIZED", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BPAINTED", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BKEYDOWN", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BINIT", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "BLBUTTONUP", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "HBITMAP", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "HPALETTE", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "CGETFILE", {HB_FS_PUBLIC}, {HB_FUNCNAME( CGETFILE )}, NULL },
{ "EMPTY", {HB_FS_PUBLIC}, {HB_FUNCNAME( EMPTY )}, NULL },
{ "GDIBMP", {HB_FS_PUBLIC}, {HB_FUNCNAME( GDIBMP )}, NULL },
{ "RESIZE", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "GETGDIHBITMAP", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "_HBITMAP", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "_HPALETTE", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "PALBMPFREE", {HB_FS_PUBLIC}, {HB_FUNCNAME( PALBMPFREE )}, NULL },
{ "HASALPHA", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "REFRESH", {HB_FS_PUBLIC | HB_FS_MESSAGE}, {NULL}, NULL },
{ "FW_GT", {HB_FS_PUBLIC}, {HB_FUNCNAME( FW_GT )}, NULL },
{ "ERRORSYS", {HB_FS_PUBLIC}, {HB_FUNCNAME( ERRORSYS )}, NULL },
{ "(_INITSTATICS00001)", {HB_FS_INITEXIT | HB_FS_LOCAL}, {hb_INITSTATICS}, NULL }
HB_INIT_SYMBOLS_EX_END( hb_vm_SymbolInit_GDIPLUS4, "gdiplus4.prg", 0x0, 0x0003 )

#if defined( HB_PRAGMA_STARTUP )
   #pragma startup hb_vm_SymbolInit_GDIPLUS4
#elif defined( HB_DATASEG_STARTUP )
   #define HB_DATASEG_BODY    HB_DATASEG_FUNC( hb_vm_SymbolInit_GDIPLUS4 )
   #include "hbiniseg.h"
#endif

HB_FUNC( MAIN )
{
    static const HB_BYTE pcode[] =
    {
        13,2,0,36,7,0,48,1,0,176,2,0,12,0,
        92,5,92,5,93,182,3,93,76,4,106,19,84,101,
        115,116,105,110,103,32,71,68,73,43,32,67,108,97,
        115,115,0,100,100,100,100,100,100,100,97,128,128,128,
        0,97,128,128,128,0,100,100,120,120,120,120,120,100,
        106,5,111,87,110,100,0,100,100,112,25,80,1,36,
        9,0,48,1,0,176,3,0,12,0,92,20,92,12,
        106,6,99,114,101,97,114,0,100,89,17,0,0,0,
        1,0,2,0,176,4,0,95,255,12,1,6,92,40,
        92,20,100,100,9,120,9,100,9,100,100,9,100,9,
        112,19,73,36,11,0,48,1,0,176,3,0,12,0,
        92,20,93,130,0,106,6,115,97,108,105,114,0,100,
        89,17,0,0,0,1,0,1,0,48,5,0,95,255,
        112,0,6,92,40,92,20,100,100,9,120,9,100,9,
        100,100,9,100,9,112,19,73,36,13,0,48,1,0,
        176,6,0,12,0,92,3,92,28,93,32,3,93,32,
        3,100,106,1,0,9,95,1,100,100,9,9,100,100,
        9,100,9,100,9,112,19,80,2,36,15,0,48,7,
        0,95,1,100,48,8,0,95,1,112,0,48,9,0,
        95,1,112,0,48,10,0,95,1,112,0,48,11,0,
        95,1,112,0,48,12,0,95,1,112,0,48,13,0,
        95,1,112,0,48,14,0,95,1,112,0,100,100,100,
        100,100,100,100,100,100,100,48,15,0,95,1,112,0,
        9,112,20,73,36,18,0,100,110,7
    };

    hb_vmExecute( pcode, symbols );
}

HB_FUNC( OBMPLOADFROMFILE )
{
    static const HB_BYTE pcode[] =
    {
        13,5,3,36,22,0,48,16,0,95,1,112,0,80,
        4,36,23,0,48,17,0,95,1,112,0,80,5,36,
        25,0,121,80,7,36,26,0,176,18,0,106,5,99,
        111,103,101,0,106,4,42,46,42,0,12,2,80,8,
        36,27,0,176,19,0,95,8,12,1,31,78,36,28,
        0,48,1,0,176,20,0,12,0,95,8,112,1,80,
        6,36,29,0,176,19,0,95,2,12,1,28,11,176,
        19,0,95,3,12,1,31,17,36,30,0,48,21,0,
        95,6,95,2,95,3,112,2,73,36,32,0,48,22,
        0,95,6,112,0,80,7,36,33,0,48,5,0,95,
        6,112,0,73,36,35,0,48,23,0,95,1,95,7,
        112,1,73,36,36,0,48,24,0,95,1,121,112,1,
        73,36,38,0,176,19,0,95,4,12,1,31,14,36,
        39,0,176,25,0,95,4,95,5,20,2,36,42,0,
        48,26,0,95,1,112,0,73,36,43,0,48,27,0,
        95,1,112,0,73,36,45,0,100,110,7
    };

    hb_vmExecute( pcode, symbols );
}

HB_FUNC_INITSTATICS()
{
    static const HB_BYTE pcode[] =
    {
        117,30,0,1,0,116,30,0,4,0,0,82,1,0,
        7
    };

    hb_vmExecute( pcode, symbols );
}


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

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Mon Nov 02, 2015 6:36 pm

mastintin wrote:yes , send me a email to mastintin_arroba_gmail_punto_com


Sent.

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

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Mon Nov 02, 2015 6:43 pm

I received the LIBs, thank you. Tried: same result. :-(

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

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Mon Nov 02, 2015 6:43 pm

Can I see your compile batch? Are you using the standard FWH buildh.bat?

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

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Mon Nov 02, 2015 6:49 pm

Enrico Maria Giordano wrote:I received the LIBs, thank you. Tried: same result. :-(

EMG


Anyway, they are identical to mine.

Summarizing:

- same FWH
- different Harbour
- different Borland
- all EXEs work fine for you
- EXE compiled by you works fine here
- EXE compiled by me don't work fine here

Conclusions?

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

Re: Bad quality with GIF (and GDI+)

Postby mastintin » Mon Nov 02, 2015 7:01 pm

same c pcode file .
my gdiplus4.obj file https://www.dropbox.com/s/u6y6p386dp7f2 ... 4.obj?dl=0
link this obj and we see the result.
and my gdiplus.lib from bcc7 for link
https://www.dropbox.com/s/albo5nc9muv33 ... s.lib?dl=0
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm


Re: Bad quality with GIF (and GDI+)

Postby mastintin » Tue Nov 03, 2015 6:51 am

You can try your exe on another pc without fwh ?
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Bad quality with GIF (and GDI+)

Postby mastintin » Tue Nov 03, 2015 9:04 am

Compiling on another PC, it gives me the same problem as you... ¿?.
windows10 home, fwh last, harbour,bcc7 , same configuration ....
-------------------- edit--------------------------------
I think I can locate :-)
I'm reporting
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm


Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Tue Nov 03, 2015 10:06 am

On XP and Vista your sample shows a black rectangle. :-(

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

Re: Bad quality with GIF (and GDI+)

Postby mastintin » Tue Nov 03, 2015 10:06 am

locate problem .....
in gdiplus.cpp change this ...

Code: Select all  Expand view


 HB_FUNC( GDIPLUSIMAGELOADCACHEDFILE )
{

.....
 
CreateStreamOnHGlobal ( hglobal, TRUE, &pstm ) ;

 Bitmap  *original = new  Bitmap( pstm,FALSE );
 

 int nWidth  = original->GetWidth()  ;
 int nHeight = original->GetHeight() ;

 Bitmap* newImage  = new Bitmap( nWidth, nHeight, PixelFormat32bppPARGB ) ; //   cambio aqui ---- original->GetPixelFormat() );

 Graphics * graphics = new Graphics( newImage );
 graphics->DrawImage( original ,0, 0, nWidth, nHeight);

 delete graphics ;
 delete original ;

..........

 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Bad quality with GIF (and GDI+)

Postby mastintin » Tue Nov 03, 2015 10:08 am

Enrico Maria Giordano wrote:On XP and Vista your sample shows a black rectangle. :-(

EMG


https://support.microsoft.com/es-es/kb/958911
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Bad quality with GIF (and GDI+)

Postby Enrico Maria Giordano » Tue Nov 03, 2015 10:17 am

mastintin wrote:locate problem .....
in gdiplus.cpp change this ...


Great! Can you send me the new libs, please?

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

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests