Open gaamaaresosa opened 5 months ago
My problem is solved. After 2 days of experiment, I couldn't find the clue at all. But the below link helped me. 1) FreeImage_Allocate() with proper dimension succeeded the FreeImage_Paste()
(Carsten Klein - 2009-02-20) https://sourceforge.net/p/freeimage/discussion/36110/thread/b2bd58bc/
Attention: Currently, the image pasted with FreeImage_Paste must not exceed any of the destination image's sides. There is no automatic clipping performed so, you have to ensure that parameters top and left are not smaller than 0 (zero) and left +
I use VB6 wrapper module for years successfully.
Today I need to load a PNG file and copy some portion from that and paste it on another new dib and save a new PNG file. Until copy no issues I get a valid image on new dibSplit. But to paste that result on another new dib, I don't know what to do.
1) First of all there is no function seen in FreeImage VB6 wrapper to create an empty dib with a specified dimension. 2) So I tried loading another PNG image and created new dibDst. 3) FreeImage_Paste always return false.
Here is my code:
Last 2 days I have no success ! If I do it on GDI+ API, then it will take me more days. Please help me !!!
Thanks in advance.