2025-08-22 21:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

251 views
Skip to first unread message

Przemyslaw Czerpak

unread,
Aug 22, 2025, 3:51:13 PMAug 22
to harbou...@googlegroups.com
2025-08-22 21:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
+ contrib/hbbmp/core.c
+ contrib/hbbmp/hbbmp.ch
+ contrib/hbbmp/hbbmp.h
+ contrib/hbbmp/hbbmp.hbc
+ contrib/hbbmp/hbbmp.hbp
+ contrib/hbbmp/hbbmp.hbx
+ contrib/hbbmp/readme.txt
+ contrib/hbbmp/tests/hbbmptst.prg
+ contrib/hbbmp/tests/hbmk.hbm
+ added new BMP image library for Harbour
; HBBMP is small library for Harbour dedicated to create and modify
BMP images. It has not any 3rd party libs dependencies.
See readme.txt for more information

+ contrib/hbzebra/tests/bmp.prg
+ added example code which uses HBBMP as backend for HBZEBRA and
creates BMP images with generated barcodes.

best regards
Przemek

Grigory Filatov

unread,
Aug 23, 2025, 12:13:01 PM (13 days ago) Aug 23
to Harbour Developers
Hi Przemek,

Thanks for the new toy hbbmp.

# Two tiny but important fixes / adds

1. Wrapper typo (y argument): In the C wrappers for HB_BMP_PUTPIXEL and HB_BMP_GETPIXEL, the y parameter is parsed as hb_parni( hb_parni( 3 ) ) instead of hb_parni( 3 ). Replace both occurrences (shown below) or you’ll pass garbage for Y:

diff
- hb_retl( hb_bmp_putpixel( pBMP, hb_parni( 2 ), hb_parni( hb_parni( 3 ) ), hb_parnint( 4 ) ) );
+ hb_retl( hb_bmp_putpixel( pBMP, hb_parni( 2 ), hb_parni( 3 ), hb_parnint( 4 ) ) );

- hb_retnint( hb_bmp_getpixel( pBMP, hb_parni( 2 ), hb_parni( hb_parni( 3 ) ) ) );
+ hb_retnint( hb_bmp_getpixel( pBMP, hb_parni( 2 ), hb_parni( 3 ) ) );

Hope this is helpful.

Best regards,
Grigory

пятница, 22 августа 2025 г. в 21:51:13 UTC+2, Przemyslaw Czerpak:

marcosgambeta

unread,
Aug 24, 2025, 11:54:57 AM (12 days ago) Aug 24
to Harbour Developers
Hi Przemek,

Can you add hbbmp to contrib/hbplist.txt, please ?

Thank you.

Marcos Antonio Gambeta

Davisson Nunes De Magalhães

unread,
Aug 26, 2025, 2:59:08 PM (10 days ago) Aug 26
to Harbour Developers
Hello everyone!

After updating harbor 2025-08-22 12:00 UTC+0200

Error compiling with Visual Studio 2022 Prompt v17.14.12
Microsoft (R) C/C++  19.44.35214  x64


ERRO:

../../../filebuf.c(1658): error C2440: converter 'const void *' to 'const HB_BYTE *'
../../../../../config/rules.mk:88: recipe for target 'filebuf.obj' failed
../../config/lib.mk:68: recipe for target 'descend' failed
../config/dir.mk:68: recipe for target 'rtl.inst' failed
config/dir.mk:68: recipe for target 'src.inst' failed


Thank you always, Mr. Przemyslaw Czarnek

Lorenzo Fiorini

unread,
Aug 28, 2025, 4:50:34 AM (9 days ago) Aug 28
to harbou...@googlegroups.com
Hi, for VS C++, build could be fixed using:

diff --git a/src/rtl/filebuf.c b/src/rtl/filebuf.c
index 1c57942..b1325b0 100644
--- a/src/rtl/filebuf.c
+++ b/src/rtl/filebuf.c
@@ -1655,7 +1655,7 @@ HB_BOOL hb_fileSave( const char * pszFileName, const void * buffer, HB_SIZE nSiz
                                     NULL, NULL );
    if( pFile != NULL )
    {
-      const HB_BYTE * pData = buffer;
+      const HB_BYTE * pData = (const HB_BYTE *) buffer;

       while( nSize > 0 )
       {

Regards,
Lorenzo

Lailton Fernando Mariano

unread,
Aug 28, 2025, 11:02:54 AM (8 days ago) Aug 28
to Harbour Developers
Is it not better to use this way?

HB_BOOL hb_fileSave( const char * pszFileName, const HB_BYTE * buffer, HB_SIZE nSize )
Reply all
Reply to author
Forward
0 new messages