パッケージ jp.co.osstech.libjeid.rc

クラス RCPhoto

java.lang.Object
jp.co.osstech.libjeid.rc.RCPhoto

public class RCPhoto extends Object
RCPhotoは、第1世代在留カード等の顔画像 (DF1/EF02)に対応するクラスです。
  • コンストラクタの概要

    コンストラクタ
    コンストラクタ
    説明
    RCPhoto(byte[] encoded)
    RCPhotoオブジェクトを構築します。
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    byte[]
    符号化データを返します。
    byte[]
    顔写真(JPEG2000)を返します。
    顔写真(JPEG2000)をデコードしてBitmapARGBオブジェクトを返します。
    Stringオブジェクトを返します。

    クラスから継承されたメソッド java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • コンストラクタの詳細

    • RCPhoto

      public RCPhoto(byte[] encoded) throws IOException
      RCPhotoオブジェクトを構築します。
      パラメータ:
      encoded - 符号化データ
      例外:
      IOException - デコードエラー
  • メソッドの詳細

    • toString

      public String toString()
      Stringオブジェクトを返します。
      オーバーライド:
      toString クラス内 Object
      戻り値:
      Stringオブジェクト
    • getEncoded

      public byte[] getEncoded()
      符号化データを返します。
      戻り値:
      符号化データ
    • getPhoto

      public byte[] getPhoto()
      顔写真(JPEG2000)を返します。
      戻り値:
      顔写真(JPEG2000)
    • getPhotoBitmapARGB

      public BitmapARGB getPhotoBitmapARGB() throws IOException
      顔写真(JPEG2000)をデコードしてBitmapARGBオブジェクトを返します。
      以下は取得したBitmapARGBのインスタンスからandroid.graphics.Bitmapのインスタンスを作成するサンプルコードです。
      (argbはBitmapARGBのインスタンスです)
      
       Bitmap bitmap = Bitmap.createBitmap(argb.getData(),
                                           argb.getWidth(),
                                           argb.getHeight(),
                                           Bitmap.Config.ARGB_8888);
      戻り値:
      顔写真
      例外:
      IOException - デコードエラー