#6 make wiImage serializable

v10.07.31
closed
1
2010-02-19
2007-11-15
No

serialize calls __sleep() and unserialize calls __wakeup(). It's possible to store the image data as string in a private variable upon sleep and restore it (recreate and reload from the string) upon wakeup.

see:
- http://si.php.net/manual/en/language.oop5.magic.php
- __sleep() / __wakeup()
- serialize() / unserialize()

Discussion

  • Gasper Kozak

    Gasper Kozak - 2007-11-16

    Logged In: YES
    user_id=1598278
    Originator: YES

    suggestion: store image data in a string in a private property (lossless png format), return that private property. Upon wakeup, restore the image (handle) from the string. Possible problems: palette depth (have to confirm).

     
  • Gasper Kozak

    Gasper Kozak - 2008-02-21

    Logged In: YES
    user_id=1598278
    Originator: YES

    possible issue: upon calling __sleep, the image data is supposed to be stored as a string in a private variable, resulting in a bigger memory usage. The memory gets cleared when the image is destroyed. What format to store in? To account for transparencies and all, PNG or GD2 are probably the only two options.

     
  • Gasper Kozak

    Gasper Kozak - 2009-02-08
    • priority: 5 --> 1
     
  • Gasper Kozak

    Gasper Kozak - 2010-02-19

    This feature has been implemented in SVN.

     
  • Gasper Kozak

    Gasper Kozak - 2010-02-19
    • milestone: 746239 --> v10.07.31
    • assigned_to: nobody --> gasper_k
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks