- Juan Jose Marquez Martin
- PowerBuilder
- Wednesday, 13 May 2020 03:57 PM UTC
Hi all,
I'm developing a couple of user objects that can view with them images / pdf, one of the features that I want to incorporate is rotate the images.
No problem with the rotation, I call to the Gdi32.dll and kernel32.dll API functions actuating directly with blob variables containing the images.
But, I need always convert the source image (a TIFF for example) to BMP and this is made throughout the inkPictureObject.save( blob_variable, 0, false ) call and the inverse process with a call inkPictureObject.save( blob_variable, type_of_format, false ), obviously befor I've reset the control and loadPicture with a ok control for each action, as you can see
ip_rotate.visible = true
lb_loaded = ( ip_rotate.resetPicture() = 1 )
IF lb_loaded THEN
ip_rotate.picturesizemode = inkPicAutoSize!
lb_loaded = ( ip_rotate.loadPicture( ablb_image ) = 1 )
width = ip_rotate.width
height = ip_rotate.height
ip_rotate.picturesizemode = inkPicStretched!
END IF
IF lb_loaded THEN
// After this statement, lb_loaded takes FALSE value and lblb_result
// hasn't any value
lb_loaded = ( ip_rotate.Save( lblb_result, IMAGE_BMP, false ) = 1 )
END IF
ip_rotate.visible = false
Randomly, the save fails, and sometimes a "Not Enough Memory" from the system error notify occurs, after this, no way to make more save properly.
Even, I tried to set the PB_POOL_THRESHOLD from 20K until over 20M in steps, but no positive results, PB_HEAP_DEBUG = true capturating the memory unload (fails on PBSHR170.dll)... but nothing works
The object where I do this actions it's created, called and destroyed each time -in the last version of the tests, but on the beginning was on the same object where now the call is made-
Some idea how to resolve this?
No option to use any OCX or external product, the cause of this problem it's this spec for my project.
Thanks a ton in advance for any help.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.