Página 1 de 1

Atualização Harbour 29/08/2025

Enviado: 01 Set 2025 09:54
por Itamar M. Lins Jr.
Olá!

Aqui, o pedaço do código demonstrando que ficou mais rápido a geração do BMP.

Código: Selecionar todos

 /* and now much faster version */
         cBitMap := hb_zebra_getbitmap( hZebra, nAlign, .T./*lBottomUp>*/, @nWidth, @nHeight, nLineWidth, nLineHeight, nX )
         pBMP := hb_bmp_frombitmap( cBitMap, nAlign, nWidth, nHeight, nDepth, /*nDPI*/, /*aPalette*/, /*@nError*/ )
         cFile := Lower( cType ) + "b.bmp"
         ? "Creating BMP file:", cFile
         IF ! hb_bmp_save( pBMP, cFile )
            ? "Cannot save BMP to file:", cFile
         ENDIF
         /* destroy BMP file */
         pBMP := NIL

Código: Selecionar todos

2025-08-29 12:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * contrib/hbbmp/core.c
  * contrib/hbbmp/hbbmp.ch
  * contrib/hbbmp/hbbmp.h
  * contrib/hbbmp/hbbmp.hbx
    + added new PRG functions:
         hb_bmp_frombitmap( <cBitMap>, <nAlign>, <nWidth>, <nHeight>, ;
                            [<nDepth>=1], [<nDPI>=72], [<aPalette>], ;
                            [@<nError>] ) -> <pBMP> | NIL
         hb_bmp_colorreset( <pBMP> )

  * contrib/hbct/dattime3.c
    ! struct timespec initialization

  * contrib/hbplist.txt
    + added hbbmp library

  * contrib/hbzebra/coredraw.c
  * contrib/hbzebra/hbzebra.hbx
    + added new PRG function:
         hb_zebra_getbitmap( <hZebra>, <nAlign>=8, <lBottomUp>=.F., ;
                             @<nWidth>, @<nHeight>, <nScaleX>, <nScaleY>, ;
                             <nBorder> ) -> <cBitMap> | NIL

  * contrib/hbzebra/tests/bmp.prg
    + added example for much faster BMP creation using hb_zebra_getbitmap() and
      hb_bmp_frombitmap() functions

  * src/rtl/filebuf.c
    ! casting

  * src/vm/extrap.c
    * allocate stack buffer dynamically, in new Linux version IGSTKSZ is
      defined as sysconf( _SC_SIGSTKSZ ) so it cannot be used as legal size
      for static arrays

2025-08-23 18:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * contrib/hbbmp/core.c
    ! fixed copy & past typos reported by Grigory Filatov. Thanks a lot.
Saudações,
Itamar M. Lins Jr.