980926-1 |
Write an ASN.1 specification to transfer an image. The image is sometimes in GIF and sometimes in JPEG format, and the choice of format must also be transferred. In addition to the picture, also its name, specified as a text string, shall be transferred. | |
Possible reply |
Solution 1:Picture ::=
SEQUENCE { Gif ::= OCTET STRING Jpeg ::= OCTET STRING |
Solution 2:Picture ::=
SEQUENCE { Note: BIT STRING is equally good as OCTET STRING. Many students proposed various text strings, like Graphic String, but they are not suitable for binary data like GIF or JPEG images. |