Method and component for serialization of images
First Claim
1. A method of providing a computer programming application in an object-oriented computer programming language, comprising the steps of:
- providing a serialization class of an object-oriented class hierarchy, said serialization class supporting serialization of images, said serialization class containing an image class data member, a primitive data type class data member, and at least one serialization method for automatically serializing image data;
converting data representing an image in an object which is an instance of said image class data member into data representing said image in an object which is an instance of said primitive data type class data member, said data representing said image in an object which is an instance of said primitive data type class member comprising an array of integers representing the image pixels;
creating a color table of unique integers from the integer array;
converting each integer in the integer array into an index into the color table;
compressing data representing said image in the object which is an instance of said primitive data type class data member before serialization, said compressing step including the step of compressing the combined color table and array of indices; and
serializing said object which is an instance of said primitive data type class data member so that the object can be made persistent;
wherein said converting and said serializing steps are performed by said at least one serialization method of said serialization class supporting serialization of images.
1 Assignment
0 Petitions
Accused Products
Abstract
Java™ Development Toolkit version 1.1.x (JDK) does not support the serialization of images. JDK on the other hand allows primitive data types to be serialized. This means that an application developer can design an application so that any primitive data type objects, including objects comprising primitive data type components, can be written to a file or another area of memory, before an application closes. When the application re-opens, the primitive data types can be de-serialized and so recovered and the application can continue as if it had never closed with the exception that image objects will not have been recovered. The invention discloses a component for a development kit comprising means for converting an image object into a primitive data type object and means for serializing that object so that the object can be made persistent. In a preferred embodiment, the component converts an image object to an array of integers representing the image pixels; creates a color table of unique integers from the integer array; converts each integer in the integer array into an index into the color table; and zip compresses the combined color table and array of indices before serialization.
34 Citations
11 Claims
-
1. A method of providing a computer programming application in an object-oriented computer programming language, comprising the steps of:
-
providing a serialization class of an object-oriented class hierarchy, said serialization class supporting serialization of images, said serialization class containing an image class data member, a primitive data type class data member, and at least one serialization method for automatically serializing image data;
converting data representing an image in an object which is an instance of said image class data member into data representing said image in an object which is an instance of said primitive data type class data member, said data representing said image in an object which is an instance of said primitive data type class member comprising an array of integers representing the image pixels;
creating a color table of unique integers from the integer array;
converting each integer in the integer array into an index into the color table;
compressing data representing said image in the object which is an instance of said primitive data type class data member before serialization, said compressing step including the step of compressing the combined color table and array of indices; and
serializing said object which is an instance of said primitive data type class data member so that the object can be made persistent;
wherein said converting and said serializing steps are performed by said at least one serialization method of said serialization class supporting serialization of images. - View Dependent Claims (2, 3, 4, 10)
de-serializing said object which is an instance of said primitive data type class data member; and
converting data representing an image in the de-serialized object which in an instance of said primitive data type class data member to image data in an object which is an instance of said image class data member so that the image can be displayed;
wherein said de-serializing and converting data representing an image in the de-serialized object steps are performed by at least one de-serialization method of said serialization class.
-
-
10. A method as claimed in claim 2 wherein the compressing step includes the step of zipping the data type object before serialization.
-
5. A component for an application in an object-oriented programming language, comprising:
-
a serialization class of an object-oriented class hierarchy, said serialization class supporting serialization of contents of unserializable objects, said serialization class containing a first class data member, and a second class data member, and at least one serialization method for automatically serializing data contained in objects of said first class data member, wherein objects of said first class data member are unserializable, and wherein objects of said second class data member are primitive data types and are serializable; and
wherein said at least one serialization method converts the contents of an object which is an instance of said first class data member to the contents of an object which is an instance of said second class data member and serializes the object which is an instance of said second class data member so that the object can be made persistent, wherein said at least one serialization method performs the steps of;
(a) converting image data in an object which is an instance of said first class data member to an array of said primitive data type, (b) generating a color table for image data in an object which is an instance of said first class data member, (c) converting each value of said array into an index value in said color table to generate an array of indices, and (d) compressing said color table and said array of indices. - View Dependent Claims (6, 7, 8, 9, 11)
-
Specification