FileDocCategorySizeDatePackage
PNG.javaAPI DocApache Poi 3.0.12315Thu May 31 18:45:28 BST 2007org.apache.poi.hslf.blip

PNG

public class PNG extends Bitmap
Represents a PNG picture data in a PPT file
author
Yegor Kozlov

Fields Summary
Constructors Summary
Methods Summary
public byte[]getData()

return
PNG data

         byte[] data = super.getData();
          try {
              //PNG created on MAC may have a 16-byte prefix which prevents successful reading.
              //Just cut it off!.
              BufferedImage bi = ImageIO.read(new ByteArrayInputStream(data));
              if (bi == null){
                  byte[] png = new byte[data.length-16];
                  System.arraycopy(data, 16, png, 0, png.length);
                  data = png;
              }
          } catch (IOException e){
              throw new HSLFException(e);
          }
         return data;
     
public intgetSignature()
PNG signature is 0x6E00

return
PNG signature (0x6E00)

        return 0x6E00;
    
public intgetType()

return
type of this picture
see
org.apache.poi.hslf.model.Picture#PNG

        return Picture.PNG;