Android マーケットにあげてみた4

Standard

https://market.android.com/details?id=com.bugcloud.android.vg
 
How to use
 
First of all, set your glitch settings following [menu] -> [setting].
 
setting1

Setting

 
Unless you checked “LAUGHING GLITCH”, you can see normal glitch in camera view.
Setting values of “MIN” and “MAX” will be used in glitching.(When the value of “MIN” is greater than “MAX”, you will see no effects.) The selector of “GLITCH LEVEL” can change level of glitch. You can choose it.
 
camera view

Camera View

 
 
camera view 2

Camera View2

 
 
If you checked “LAUGHING GLITCH”, you can see glitching with face detection.
 
camera view 3

Camera View3

 
Strictly speaking, this effect is not glitch but shuffle. I want to change this until the next version up.
 
That’s all.
This application is so heavy… I should solve this task at next version up.

Android マーケットにあげてみた3

Standard

https://market.android.com/details?id=com.bugcloud.android.vg
 
How to use
 
First of all, set your glitch settings following [menu] -> [setting].
 
setting1

Setting

 
Unless you checked “I NEED GLITCH”, it will happen nothing. It’s just a simple camera. You can save image by touching anywhere of display.
 
setting2

Setting2

 
If you check “I NEED MORE GLITCH”, ‘Glitch’ will occur. Setting values of “MIN” and “MAX” will be used in glitching.(When the value of “MIN” is greater than “MAX”, you will see no effects.) The selector of “GLITCH LEVEL” can change level of glitch. You can choose it.
 
camera view

Camera View

 
 
camera view 2

Camera View2

 
That’s all.
This application is so heavy… I should solve this task at next version up.

Android マーケットにあげてみた2

Standard

https://market.android.com/details?id=com.bugcloud.android.vg
 
How to use
 
First of all, set your glitch settings following [menu] -> [setting].
 
setting1

Setting

 
Unless you checked “I NEED GLITCH”, it will happen nothing. It’s just a simple camera. You can save image by touching anywhere of display.
 
camera view

Setting2

 
If you check “I NEED MORE GLITCH”, ‘Glitch’ will occur. Setting values of “MIN” and “MAX” will be used in glitching.(When the value of “MIN” is greater than “MAX”, you will see no effects.) The selector of “GLITCH MODE” can change effect of glitch. You can choose it. (I love ‘UTF-8′ mode :P)
 
camera view

Camera View

 
That’s all.
This application is so heavy… I should solve this task at next version up.

Android マーケットにあげてみた

Standard

https://market.android.com/details?id=com.bugcloud.android.vg
 
How to use
 
First of all, set your glitch settings following [menu] -> [setting].
 
setting1

Setting

 
Red, Green and Blue seek bars set the ranges of breaking image. If the colors in image you see via your android phone’s camera were in the range of your (RGB)settings, they will be replaced to random color. Its replacement is made per 1 pixel. Min(Black) and Max(White) seek bars set the ranges of replacing random values. If you set Min -> 0 and Max -> 100(max), random color will be picked from #000000 to #ffffff.
 
camera view

Camera View

 
You can save image by touching anywhere of display.
  
If you check “I NEED MORE GLITCH”, above settings will be ignored and you can see powerful breaking image.
 
setting2

Setting2

 
camera view

Camera View

 
That’s all.
This application is so heavy… I should solve this task at next version up.

[android] WebViewからローカル画像を参照する

Standard

これも大人の事象がないと使わなそうだけど。
プログラム内でhtml文字列を生成して、WebView#loadData(html, “text/html”, “UTF-8″) とかやりたいときに、

String html = "<!DOCTYPE html><html><head><title>Sample</title></head><body>" +
"<img src\"PATH_TO_LOCAL_IMAGE\"></body></html>";

って感じでimgタグのsrcにAPP_ROOT/res/drawable/ 配下の画像を使いたいとかそんな。APP_ROOT/assets/ 配下にhtmlファイルを作ってやれば普通に相対パスでAPP_ROOT/assets/img/ 以下を参照できるんだけど、そうもいかないとき。(html文字列内のjavascriptの中に端末情報を埋め込まないといけないとか)
 
 
解決策はWebView#loadDataWithBaseURLの第一引数に参照したいディレクトリのURIを指定する。です。APP_ROOT/res/drawable/unbaba.pngって画像を指定するとしたらこう。

String html = "<!DOCTYPE html><html><head><title>Sample</title></head><body>" +
"<img src\"unbaba.png\"></body></html>";
webView.loadDataWithBaseURL("file:///android_res/drawable/", html, "text/html", "UTF-8", null);

 
ドキュメントをちゃんと読みましょうっていうお話。
 
 
参考:http://remotedroid.net/blog/2011/01/14/referencing-drawables-in-html-in-androids-webview/