FileDocCategorySizeDatePackage
HSSFPictureData.javaAPI DocApache Poi 3.0.12589Thu May 31 18:44:06 BST 2007org.apache.poi.hssf.usermodel

HSSFPictureData

public class HSSFPictureData extends Object
Represents binary data stored in the file. Eg. A GIF, JPEG etc...
author
Daniel Noll

Fields Summary
public static final short
MSOBI_WMF
public static final short
MSOBI_EMF
public static final short
MSOBI_PICT
public static final short
MSOBI_PNG
public static final short
MSOBI_JPEG
public static final short
MSOBI_DIB
public static final short
FORMAT_MASK
private EscherBitmapBlip
blip
Underlying escher blip record containing the bitmap data.
Constructors Summary
HSSFPictureData(EscherBitmapBlip blip)
Constructs a picture object.

param
blip the underlying blip record containing the bitmap data.


                       
       
    
        this.blip = blip;
    
Methods Summary
public byte[]getData()
Gets the picture data.

return
the picture data.

        return blip.getPicturedata();
    
public java.lang.StringsuggestFileExtension()
Suggests a file extension for this image.

return
the file extension.

        switch (blip.getOptions() & FORMAT_MASK)
        {
            case MSOBI_WMF:
                return "wmf";
            case MSOBI_EMF:
                return "emf";
            case MSOBI_PICT:
                return "pict";
            case MSOBI_PNG:
                return "png";
            case MSOBI_JPEG:
                return "jpeg";
            case MSOBI_DIB:
                return "dib";
            default:
                return "";
        }