Encodeimage mysterious error

Everything else that doesn't fall into one of the other PB categories.
User avatar
a_carignan
Enthusiast
Enthusiast
Posts: 102
Joined: Sat Feb 21, 2009 2:01 am
Location: Canada

Encodeimage mysterious error

Post by a_carignan »

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

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
the explanation? :?