1 / 21

第 6 回 iPhone アプリ勉強会 〜 画像の取得と処理 〜

第 6 回 iPhone アプリ勉強会 〜 画像の取得と処理 〜.                       縣 禎輝. はじめに. カメラアプリを作成 基盤となる Interface とアクションメソッドの作成 画像の取得先の設定 画像の表示と保存 画像にエフェクトをかける 参考ウェブサイト http:// journal.mycom.co.jp/column/iphone/index.html. アプリの基盤作成. アクションシートの作成 Interface Builder の作成 アクションの実装 メソッドとボタンの接続.

Download Presentation

第 6 回 iPhone アプリ勉強会 〜 画像の取得と処理 〜

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第6回iPhoneアプリ勉強会〜画像の取得と処理〜第6回iPhoneアプリ勉強会〜画像の取得と処理〜                       縣禎輝

  2. はじめに • カメラアプリを作成 • 基盤となるInterfaceとアクションメソッドの作成 • 画像の取得先の設定 • 画像の表示と保存 • 画像にエフェクトをかける • 参考ウェブサイト • http://journal.mycom.co.jp/column/iphone/index.html

  3. アプリの基盤作成 • アクションシートの作成 • Interface Builderの作成 • アクションの実装 • メソッドとボタンの接続

  4. Interface Builderの作成 • Step1. ToolBarをドラック&ドロップ

  5. Interface Builderの作成 • Step2.インスペクタパネルで,Identifierを“Camera”に指定

  6. Interface Builderの作成 • Step3.カメラアイコンを中央に表示

  7. アクション(選択画面表示)の実装 Step1.ImageViewController.hの編集 - アクションメソッドを作成

  8. アクション(選択画面表示)の実装 • Step2.ImageViewController.mの編集 - showImageSheetメソッドの実装

  9. メソッドの接続 実行結果 • Interface Builder でメソッドとボタンを接続

  10. 画像の取得先の設定 • 作成した選択ボタンのリンク先を設定 • Photo Library → “Photo Library”へ移動 • Camera → “Cameraの撮影画面”へ移動 • Saved Photo → “以前Cameraで撮影した画像”へ移動

  11. ボタンのリンク先を設定 • Step1.imageViewController.hの編集 *詳しく • イメージピッカーを使用する • 写真を撮るために使う機能 • UIImagePickerControllerというクラスで使用可能

  12. ボタンのリンク先を設定 • Step2.imageViewController.mの編集 • ボタンが押されたときの処理

  13. 画像の表示と保存 • リンク先から指定された画像を表示 • 画像の取得 • 描画範囲の指定 • 画像のリサイズ

  14. 画像の表示と保存 Step1.imageViewController.hの編集 • 画像表示用のアウトレットを作成

  15. 画像の表示と保存 • Step2.imageViewController.mの編集 • アウトレットの内容

  16. Interface Builderの編集 • 画像表示用の描画領域を作成 • 描画領域とアウトレットを接続 実行結果

  17. 画像にエフェクトをかける • 画像の情報を取得し,エフェクトをかける • 画像の情報をビットマップデータとして取得

  18. 画像にエフェクトをかける • Step1.ImageViewController.hの編集 - Core Graphics:画像のビットマップデータを取得可能なAPI を持つ

  19. 画像にエフェクトをかける • Step2.ImageViewController.mの編集 - 画像の情報を取得し,エフェクトをかける 実行結果

  20. 2値化の答え

  21. おわりに • カメラアプリを作成 • 基盤となるInterfaceとアクションメソッドの作成 • 画像の取得先の設定 • 画像の表示と保存 • 画像にエフェクトをかける • 参考ウェブサイト • http://journal.mycom.co.jp/column/iphone/index.html

More Related