FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Gluing bitmaps
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 10:33 AM
Bitmap files

https://cloud.mail.ru/public/4BD8/9WAeuMRyu
Code (fw): Select all Collapse
function Main
local hBmp, bmp1:="C:\TMP\map.bmp", bmp2:="C:\TMP\lgd.bmp"
local img:={FW_ReadImage( nil, bmp1 ), ; // [3],[4] are width and height
                  FW_ReadImage( nil, bmp2 )}
local oCommDlg, oFiles


  hBmp := FW_MakeYourBitmap( img[1,3]+10, img[1,4]+6, ;
                  { |hDC, w, h| PaintOverlay( hDC, w, h, img) } )

  PalBmpFree( img[1] )
  PalBmpFree( img[2] )

  FW_SaveImage( hBmp, pr1 ) // cSave can be bmp,jpg,png

  DeleteObject( hBmp )

  ************************************************
  oCommDlg := FWGetOleObject( "WIA.CommonDialog" )
  oFiles   := FWGetOleObject( "WIA.Vector")

  if valtype(oFiles)="O"
     oFiles:Add(bmp1)
     oCommDlg:ShowPhotoPrintingWizard(oFiles)

  else
 ? "Not found WiaAut.dll"
  endif

return NIL

static function PaintOverlay( hDC, w, h, img)
local t,l

  FW_DrawImage( hDC, img[1] )

  t :=10 && top
  l := w - img[2, 3] - 20 && left

  FW_DrawImage( hDC, img[2], { t, l, t + img[2, 4], l + img[2, 3] } )
return nil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 10:39 AM

map.bmp is missing

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 10:45 AM
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 10:50 AM

Now I get this:

Unresolved external '_HB_FUN_PAINTOVERLAY'

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 10:59 AM
Excuse me
Code (fw): Select all Collapse
static function PaintOverlay( hDC, w, h, img)
local t,l

  FW_DrawImage( hDC, img[1] )

  t :=10 && top
  l := w - img[2, 3] - 20 && left

  FW_DrawImage( hDC, img[2], { t, l, t + img[2, 4], l + img[2, 3] } )
return nil
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:12 AM

> FW_SaveImage( hBmp, pr1 ) // cSave can be bmp,jpg,png

Ambiguous reference 'PR1'

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:18 AM
pr1 this bmp1
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:19 AM

Error description: (DOS Error -2147352567) WINOLE/1007 The system cannot find the file specified.

(0x80070002): WIA.CommonDialog.1

Args:

 [   1] = O   WIA.Vector

Stack Calls

===========

Called from: => TOLEAUTO:SHOWPHOTOPRINTINGWIZARD( 0 )

Called from: natter.prg => MAIN( 26 )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:21 AM

Error description: Error BASE/1004 No exported method: SHOWPHOTOPRINTINGWIZARD

Args:

 [   1] = U

 [   2] = O   WIA.Vector

Stack Calls

===========

Called from: => SHOWPHOTOPRINTINGWIZARD( 0 )

Called from: natter.prg => MAIN( 26 )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:21 AM

Where to get the WIA component from ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:25 AM
https://cloud.mail.ru/public/aoZX/Y4f1Tif8H

This is WIAAUT.DLL to provide a standard print dialog. IT should be placed next to the .EXE file
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:27 AM

I did it and also did: regsvr32 WIAAUT.DLL

but same errors...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:28 AM

Can you provide an example that does not use WIA ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:46 AM

The problem was that after upgrading the libraries, I did not remove the LoadFreeImage() function from the program. Everything is fine now

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Gluing bitmaps
Posted: Wed Dec 14, 2022 11:56 AM
very good! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion