Encodeimage mysterious error
Posted: Sun Feb 15, 2015 4:13 pm
Here is a code in a common file. Macro functions in software and not the other. The most bizare is that version32 bits execute properly, the explanation.
common Code
the explanation? 
common Code
Code: Select all
Macro saveimagetoblob(image,index)
Debug "encodage"
*image_buffer=EncodeImage(image,#PB_ImagePlugin_JPEG) ; Error 64-bit version of a software druide3.
Debug "setdatabaseblob"
SetDatabaseBlob(0,index,*image_buffer,MemorySize(*image_buffer))
EndMacro
Here is the code in the editor and is functional.
Procedure saveimage_canvas()
set_image()
saveimagetoblob(image,0)
CheckDatabaseUpdate(0, "INSERT INTO tirage (name, info,type,image) VALUES ('"+ReplaceString(GetGadgetText(string_titre),"'","''")+"', '"+ReplaceString(GetGadgetText(string_info),"'","''")+"','"+GetGadgetText(combo_type)+"',?)")
FreeImage(image)
FreeMemory(*image_buffer)
EndProcedure
Here is the code in the editor and is not functional in 64bit.
Procedure saveimage_canvas()
set_image()
saveimagetoblob(image,0)
CheckDatabaseUpdate(0, "INSERT INTO tirage (name, info,description,type,image) VALUES ('"+ReplaceString(tirage\nom,"'","''")+"', '"+ReplaceString(tirage\info,"'","''")+"','"+ReplaceString(GetGadgetText(Editor_description),"'","''")+"','"+tirage\type+"',?)")
FreeImage(image)
FreeMemory(*image_buffer)
EndProcedure