Upgrade to Pro — share decks privately, control downloads, hide ads and more …

kotlin season 1 - Part 21 Renderscript Example

TaeHwan
November 25, 2016
38

kotlin season 1 - Part 21 Renderscript Example

2016년 유데미 Kotlin 강의를 공개합니다.

동영상 : https://www.youtube.com/watch?v=kLnZ5luNjl8

2회 분은 유데미에서 확인 가능합니다.
http://bit.ly/2UpaJUR

TaeHwan

November 25, 2016
Tweet

Transcript

  1. ࢠ೒ ௏٘ח!!! • Sample Code GitHub ࠳۠஖ : 14-Renderscript •

    https://github.com/taehwandev/Kotlin-Udemy-Sample/tree/ 14-Renderscript ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 2
  2. য়ט਷ • Renderscript ࣗѐ • Renderscript ੸ਊ ࠗ࠙ ഛੋ ରࣁ؀

    উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 3
  3. Renderscript • Android Renderscriptח Android API 11(ೲפஹ)ীࢲ ୊਺ ࣗѐ •

    Support Libraryਸ ా೧ v9 ੉࢚ীࢲ ࢎਊ оמ • ੢஖੄ CPU, ݣ౭ ௏য CPU, GPU ١ীࢲ ࣻ೯ؼ ࣻ ੓׮. ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 4
  4. Renderscript ੸ਊೞӝ android { compileSdkVersion 24 buildToolsVersion "24.0.3" defaultConfig {

    minSdkVersion 9 targetSdkVersion 24 renderscriptTargetApi 18 renderscriptSupportModeEnabled true } } ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 6
  5. Renderscript ઱ਃ ௏٘ val renderScript: RenderScript = RenderScript.create(context) val blurInput:

    Allocation = Allocation.createFromBitmap(renderScript, bitmap, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT) val blurOutput: Allocation = Allocation.createTyped(renderScript, blurInput.type) val blur: ScriptIntrinsicBlur = ScriptIntrinsicBlur.create(renderScript, Element.U8_4(renderScript)) // Set the radius of the Blur. Supported range 0 < radius <= 25 blur.setRadius(temp) blur.setInput(blurInput) blur.forEach(blurOutput) blurOutput.copyTo(bitmap) renderScript.destroy() ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 7
  6. ੸ਊ ࠗ࠙ ઱ਃ ௏٘ private fun drawBackgroundImage() { rootContainer.isDrawingCacheEnabled =

    true rootContainer.buildDrawingCache(true) rootContainer.drawingCache.createBlurImage(context)?.let { rlBlurView.setImageView(it) } rootContainer.isDrawingCacheEnabled = false } ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 8
  7. ଵҊ ੗ܐ • Renderscript • উ٘۽੉٘ RenderScript द੘ೞӝ - ԷԲח

    ѐߊ੗੄ ۽Ӓ ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016 10