天天看点

android获取图片文件头信息

/**

      * 获取图片文件头信息

      * @param in

      * @return

      */

     public static BitmapFactory.Options getImageOptions(InputStream in) {

         BitmapFactory.Options opts = new BitmapFactory.Options();

         opts.inJustDecodeBounds = true;

   BitmapFactory.decodeStream(in, null, opts);

         return opts;

     }