기본 콘텐츠로 건너뛰기

3월, 2018의 게시물 표시

Android, ImageView, Animated GIF

build.gradle dependencies { compile 'com.github.bumptech.glide:glide:3.6.1' } val fireView = findViewById<ImageView>(R.id. fireView_display ) val target = GlideDrawableImageViewTarget(fireView) Glide.with( this ).load(R.raw. giphy ).into(target) ref :  https://qiita.com/maehara08/items/eef63804c52b2e0bb404

Android, GPUImage, get image filtered

- set Uri, get bitmapWithFilterApplied --> NG : NPE var imageUri : Uri? = data?. data val gpuImage = GPUImage( this ) gpuImage.setImage( imageUri ) gpuImage.setFilter(GPUImageColorInvertFilter()) mainImageView ?.setImageBitmap(gpuImage. bitmapWithFilterApplied ) - set Bitmap, get bitmapWithFilterApplied --> OK val gpuImage = GPUImage( this ) val editedImage : BitmapDrawable = mainImageView ?. drawable as BitmapDrawable gpuImage.setImage(editedImage. bitmap ) gpuImage.setFilter(GPUImageColorInvertFilter()) mainImageView ?.setImageBitmap(gpuImage. bitmapWithFilterApplied )

iOS, Swift, back button

- prev ViewController -- add @IBAction func myExit(sender : UIStoryboardSegue ){ } - storyboard -- add button --- drag button to Exit(3rd icon upper menu) ref :  https://m.blog.naver.com/PostView.nhn?blogId=jdub7138&logNo=220393890771&proxyReferer=https%3A%2F%2Fwww.google.co.jp%2F

iOS, Swift, AVPlayerViewController, test

- add framework -- AVKit.framework -- AVFoundation.framework - Bulid Phases -- Copy Bundle Resources --- add movie clip (a.mp4) - storyboard -- add ViewController (AVPlayerViewController) --- create new AVPlayerViewController and link - add code override func viewDidLoad(){         super . viewDidLoad ()         if let bundlePath = Bundle . main . path (forResource: "a" , ofType: "mp4" ) {                           print ( "bundlePath \ ( bundlePath )" )                          let videoPlayer = AVPlayer (url: URL (fileURLWithPath: bundlePath))             self . player = videoPlayer                           videoPlayer. play ()           }          /*         // streaming                  let bundlePath = URL(string: videoClipUrlStr )         print("bundlePath \(bundlePath)")                  let videoPlayer = AVPlayer(url: bundlePath!)         self.player = videoPlayer