hi to all,
I have my PRG that prints a lot of PNG files (about 500).
Function reads a TXT file whit PNG list and then print PNG inside FOR NEXT, thisi is code:
Print Preview works with about 200 files but with 500 files I get print preview with empty pages.
I think that is a memory issue due to bmp object, maybe deleteobject does not work.
Can you help me?
I have my PRG that prints a lot of PNG files (about 500).
Function reads a TXT file whit PNG list and then print PNG inside FOR NEXT, thisi is code:
PRINT oPrn NAME "PNG files" PREVIEW
...
for x = 1 to n
...
    codice = oText:ReadLine()
  // this function get in cNomeFilePng .PNG file to print
  mrp006Bmp(codice, @cNomeFilePNG)
  aBmp := WndReadPalBmpEx(nil, cNomeFilepng)
  // from here
  if BmpHeight(aBmp[1]) <> 0
    nZoomH = 1250 / BmpHeight(aBmp[1])
  endif
  if nBmpWidth(aBmp[1]) <> 0
    nZoomW = 2770 / nBmpWidth(aBmp[1])
  endif   Â
  if nZoomW >= nZoomH
    nFattore = nZoomH
  else
    nFattore = nZoomW
  endif
  // to here I get in nFattore the zoom factor
  // here resize originale .PNG
  u := ResizeBitmap( aBmp[ 1 ], nBmpWidth(aBmp[1])*nFattore, BmpHeight(aBmp[1])*nFattore, 3 )  Â
  DeleteObject( aBmp[1])
  aBmp[ 1 ]  := uÂ
  // in nRigaBmp and nColonnaBmp there is row and column to prin PNG
  nRigaBmp = 314 + ((1259-(BmpHeight(aBmp[1])))/2)
  nColonnaBmp = 3377 + ((2780-( nBmpWidth(aBmp[1])))/2)
  // print PNG resized
  DrawBitmap(oPrn:hDCOut, aBmp[1], nRigaBmp ,nColonnaBmp,0,0,SCRINVERT)  // SCRINVERT
  // and delete objects
  DeleteObject( aBmp[1])
  DeleteObject( aBmp[2])
  DeleteObject( u )
  * then I print others informations...
...
nextPrint Preview works with about 200 files but with 500 files I get print preview with empty pages.
I think that is a memory issue due to bmp object, maybe deleteobject does not work.
Can you help me?
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)