http://wiki.nonip.net/index.php?title=Android/base64&feed=atom&action=history
Android/base64 - 変更履歴
2024-03-29T10:14:34Z
このウィキのこのページに関する変更履歴
MediaWiki 1.24.2
http://wiki.nonip.net/index.php?title=Android/base64&diff=7091&oldid=prev
Admin: /* base64をdecodeして画像へ */
2018-11-02T06:01:55Z
<p><span dir="auto"><span class="autocomment">base64をdecodeして画像へ</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2018年11月2日 (金) 06:01時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行9:</td>
<td colspan="2" class="diff-lineno">行9:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  // imageButtonへ</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  // imageButtonへ</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageButton imgbtn = findViewById(R.id.imageButton1);</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageButton imgbtn = findViewById(R.id.imageButton1);</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  imgbtn.<del class="diffchange diffchange-inline">setImageDrawable(new BitmapDrawable</del>(BitmapFactory.decodeByteArray(</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  imgbtn.<ins class="diffchange diffchange-inline">setImageBitmap</ins>(BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length));</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"> </del>imageAsBytes, 0, imageAsBytes.length<del class="diffchange diffchange-inline">)</del>));</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>レイアウト</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>レイアウト</div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Android/base64&diff=7090&oldid=prev
Admin: /* base64をdecodeして画像へ */
2018-11-02T05:45:26Z
<p><span dir="auto"><span class="autocomment">base64をdecodeして画像へ</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2018年11月2日 (金) 05:45時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行27:</td>
<td colspan="2" class="diff-lineno">行27:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>画像をbase64に変換するwebサイト:https://lab.syncer.jp/Tool/Base64-encode/</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>画像をbase64に変換するwebサイト:https://lab.syncer.jp/Tool/Base64-encode/</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">画像を透過pngにするwebサイト:https://www.peko-step.com/tool/alphachannel.html</ins></div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Android/base64&diff=7089&oldid=prev
Admin: /* base64をdecodeして画像へ */
2018-11-02T05:44:03Z
<p><span dir="auto"><span class="autocomment">base64をdecodeして画像へ</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2018年11月2日 (金) 05:44時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行25:</td>
<td colspan="2" class="diff-lineno">行25:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>参考:https://stackoverflow.com/questions/30167205/base64-decode-for-image-jpegbase64-in-android</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>参考:https://stackoverflow.com/questions/30167205/base64-decode-for-image-jpegbase64-in-android</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">画像をbase64に変換するwebサイト:https://lab.syncer.jp/Tool/Base64-encode/</ins></div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Android/base64&diff=7088&oldid=prev
Admin: /* base64をdecodeして画像へ */
2018-11-02T05:36:58Z
<p><span dir="auto"><span class="autocomment">base64をdecodeして画像へ</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2018年11月2日 (金) 05:36時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行3:</td>
<td colspan="2" class="diff-lineno">行3:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  encodedDataString = encodedDataString.replace("data:image/png;base64,","");</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  encodedDataString = encodedDataString.replace("data:image/png;base64,","");</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  byte[] imageAsBytes = Base64.decode(encodedDataString.getBytes(), 0);</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  byte[] imageAsBytes = Base64.decode(encodedDataString.getBytes(), 0);</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> // imageViewへ</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageView imgView = findViewById(R.id.image1);</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageView imgView = findViewById(R.id.image1);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  imgView.setImageBitmap(BitmapFactory.decodeByteArray(</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  imgView.setImageBitmap(BitmapFactory.decodeByteArray(</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>                 imageAsBytes, 0, imageAsBytes.length));</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>                 imageAsBytes, 0, imageAsBytes.length));</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> // imageButtonへ</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> ImageButton imgbtn = findViewById(R.id.imageButton1);</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> imgbtn.setImageDrawable(new BitmapDrawable(BitmapFactory.decodeByteArray(</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> imageAsBytes, 0, imageAsBytes.length)));</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>レイアウト</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>レイアウト</div></td></tr>
<tr><td colspan="2" class="diff-lineno">行12:</td>
<td colspan="2" class="diff-lineno">行17:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_width="match_parent"</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_width="match_parent"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_height="match_parent" /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_height="match_parent" /></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> <ImageButton</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">            android:id="@+id/imageButton1"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">            android:layout_width="wrap_content"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">            android:layout_height="wrap_content"</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">            android:background="#00000000" /></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>参考:https://stackoverflow.com/questions/30167205/base64-decode-for-image-jpegbase64-in-android</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>参考:https://stackoverflow.com/questions/30167205/base64-decode-for-image-jpegbase64-in-android</div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Android/base64&diff=7087&oldid=prev
Admin: /* base64をdecodeして画像へ */
2018-11-02T03:54:08Z
<p><span dir="auto"><span class="autocomment">base64をdecodeして画像へ</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2018年11月2日 (金) 03:54時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行1:</td>
<td colspan="2" class="diff-lineno">行1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==base64をdecodeして画像へ==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==base64をdecodeして画像へ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  String encodedDataString = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFD0lEQVRYR82Yf0yUdRzH348R7TRoHAcp5WiLCcpugkthLTZwMC4oB7ogHE2kMGFJp0k15iCojIFhQOJc/qDEEpRSnEDJIr3+gAqcMhKWrViTQAjaOe9aZ37aA9w9v597jgPn89/d89z3Xs/7+/m8P5/Pl8F9fjEsH9n7qSb3CFZUVCMldNH0d95ef9/4jez65Vim8/FqPYbsQ/RhVDh2DwG+2IgvR07juRDvIMneTZm6WDQDSN22D9u3ZyA5ejl8GcZjWKY8AlQyyOk1F8g/2z6h7vAtSH/Sd3ZHuilPF4vD/G1IeAOttcXYYAz0CJJ5BSDBQvBMyYnOMjIkluLNy1ZURvsrA87CJpR/hc+L07DMR5uaDE32kFkfgxpR0GlR0gnH/rTsshWlTkCrhUz+cfhaIZAXowCnhz9CSuiM4mrXzBvPAZIPJwGkCbIcq8HHue9Ox6HctQjRODb4PbZELFGFdN30BPLOtYPkszJf8L98BZ03iGw02H4U5pTXZNVkd+nceAuSg5S3W0CvFZIco9T00lK8eJJjlAN0gdp/pYYd67H18LBUzPh6jHTlI0QhwyXyaoW8S6PUnMVBqgFOhxE56MrBXEQVHJdAmhquoSNnpexWy345F0h3gE6qgfo0iiw4I4D0QSK+mLiAFwzSrVYMUE8gTzyzFAP7rahYN2MzrLotZZ8iYOtOJIoylWiCTqUakNEmEnJbO/49ZJKYuWoGsSWwLNmIdy4JFxNbELt9Dvi4Fieezey3jGFn3KPCWL/ZTk8FP4te3rJsVp8a6cOmEKGKzK48Mz1k0EnigrHZ8F9gIGxNJagbkMa2mk+ypY5fSer6bdhhXCyA/Lk6nlbt+k6wsKnhOjpywgTPsR/InVkq3VeCFAOyxnzx1gGs9ePUYVXO9I8T+uSGI5g6m4sAXkZ7BciCy0HK/XlobT+GC42c75KD2l5+EKlHuddn1/pmqgXxAdyLeA0oB8kmQlOWQeCTfihC951KRPJq8ERbIRlSalUNf14A5SDFPsk+U9VnQ9EaLhbp90Zinsi+N4BaIMVeSfY+ytOtEbRl4mfmTUGnDOKY5CtZM3Qbr4dzzQFNniFGnyZQUByr8w6opCRr5j/ut6J21syny5+Mgm//MImKdXpXMi0IoHzi2Mj6jw6P6LgMvXujmdY+liEw7PI+G0p4cbpggEoWxN/Pe5rFH3R0wGE2gT/fqEGy5bGz8HEk1Y25mNmm4fz4BUF/OG8KVvY7UBTWC7MuVtP4wJ/8XITx9RjvykcQv5JkYDWNJ+hlq9kDf3Wh86q2Qui0B61dkJyZxxwaRM+rEZJarEowUJ9NkQWNbikFQ5PGGYdvQWw30zjci82igwO3UxVLpgVSYsKeQtpO4PbZzVgiav01AWqBlB2aNEKyw9XULV/o/aXHJJoB3UEqtfxaY1IphjwCVINUnepuNhETnClh0HI44DGgEqQS4OjVFno/a5NsV67FzOcEKAcpyGKy0XVLKxqrSlF2bsitA6gpOWdAMaQnZzNyxEqQXgHyIQWAoqFJAJR9AD+9tQLHjUmyFefk8GfYGPqwoJtxuwXuHrhSXUCXkva5Jjfx0MT+nq2ze1trYH5+1fR4SpMWMuvjJJB7vh3De+u5MdVrBeXgydpDJv+YmQOj1emo2rMbOelPI0h0Jii2oGLLGPaKZuiFAXT8QRfP/4LgKCPCQg2qR79OSD+Rcs4XXxBAdyHhyf37HvB/p8f6RxVAzkUAAAAASUVORK5CYII=";</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  String encodedDataString = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFD0lEQVRYR82Yf0yUdRzH348R7TRoHAcp5WiLCcpugkthLTZwMC4oB7ogHE2kMGFJp0k15iCojIFhQOJc/qDEEpRSnEDJIr3+gAqcMhKWrViTQAjaOe9aZ37aA9w9v597jgPn89/d89z3Xs/7+/m8P5/Pl8F9fjEsH9n7qSb3CFZUVCMldNH0d95ef9/4jez65Vim8/FqPYbsQ/RhVDh2DwG+2IgvR07juRDvIMneTZm6WDQDSN22D9u3ZyA5ejl8GcZjWKY8AlQyyOk1F8g/2z6h7vAtSH/Sd3ZHuilPF4vD/G1IeAOttcXYYAz0CJJ5BSDBQvBMyYnOMjIkluLNy1ZURvsrA87CJpR/hc+L07DMR5uaDE32kFkfgxpR0GlR0gnH/rTsshWlTkCrhUz+cfhaIZAXowCnhz9CSuiM4mrXzBvPAZIPJwGkCbIcq8HHue9Ox6HctQjRODb4PbZELFGFdN30BPLOtYPkszJf8L98BZ03iGw02H4U5pTXZNVkd+nceAuSg5S3W0CvFZIco9T00lK8eJJjlAN0gdp/pYYd67H18LBUzPh6jHTlI0QhwyXyaoW8S6PUnMVBqgFOhxE56MrBXEQVHJdAmhquoSNnpexWy345F0h3gE6qgfo0iiw4I4D0QSK+mLiAFwzSrVYMUE8gTzyzFAP7rahYN2MzrLotZZ8iYOtOJIoylWiCTqUakNEmEnJbO/49ZJKYuWoGsSWwLNmIdy4JFxNbELt9Dvi4Fieezey3jGFn3KPCWL/ZTk8FP4te3rJsVp8a6cOmEKGKzK48Mz1k0EnigrHZ8F9gIGxNJagbkMa2mk+ypY5fSer6bdhhXCyA/Lk6nlbt+k6wsKnhOjpywgTPsR/InVkq3VeCFAOyxnzx1gGs9ePUYVXO9I8T+uSGI5g6m4sAXkZ7BciCy0HK/XlobT+GC42c75KD2l5+EKlHuddn1/pmqgXxAdyLeA0oB8kmQlOWQeCTfihC951KRPJq8ERbIRlSalUNf14A5SDFPsk+U9VnQ9EaLhbp90Zinsi+N4BaIMVeSfY+ytOtEbRl4mfmTUGnDOKY5CtZM3Qbr4dzzQFNniFGnyZQUByr8w6opCRr5j/ut6J21syny5+Mgm//MImKdXpXMi0IoHzi2Mj6jw6P6LgMvXujmdY+liEw7PI+G0p4cbpggEoWxN/Pe5rFH3R0wGE2gT/fqEGy5bGz8HEk1Y25mNmm4fz4BUF/OG8KVvY7UBTWC7MuVtP4wJ/8XITx9RjvykcQv5JkYDWNJ+hlq9kDf3Wh86q2Qui0B61dkJyZxxwaRM+rEZJarEowUJ9NkQWNbikFQ5PGGYdvQWw30zjci82igwO3UxVLpgVSYsKeQtpO4PbZzVgiav01AWqBlB2aNEKyw9XULV/o/aXHJJoB3UEqtfxaY1IphjwCVINUnepuNhETnClh0HI44DGgEqQS4OjVFno/a5NsV67FzOcEKAcpyGKy0XVLKxqrSlF2bsitA6gpOWdAMaQnZzNyxEqQXgHyIQWAoqFJAJR9AD+9tQLHjUmyFefk8GfYGPqwoJtxuwXuHrhSXUCXkva5Jjfx0MT+nq2ze1trYH5+1fR4SpMWMuvjJJB7vh3De+u5MdVrBeXgydpDJv+YmQOj1emo2rMbOelPI0h0Jii2oGLLGPaKZuiFAXT8QRfP/4LgKCPCQg2qR79OSD+Rcs4XXxBAdyHhyf37HvB/p8f6RxVAzkUAAAAASUVORK5CYII=";</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  encodedDataString = encodedDataString.replace("data:image/png;base64,","");</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  encodedDataString = encodedDataString.replace("data:image/png;base64,","");</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  byte[] imageAsBytes = Base64.decode(encodedDataString.getBytes(), 0);</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  byte[] imageAsBytes = Base64.decode(encodedDataString.getBytes(), 0);</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageView imgView = findViewById(R.id.image1);</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ImageView imgView = findViewById(R.id.image1);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  imgView.setImageBitmap(BitmapFactory.decodeByteArray(</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  imgView.setImageBitmap(BitmapFactory.decodeByteArray(</div></td></tr>
<tr><td colspan="2" class="diff-lineno">行15:</td>
<td colspan="2" class="diff-lineno">行12:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_width="match_parent"</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_width="match_parent"</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_height="match_parent" /></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>             android:layout_height="match_parent" /></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">参考:https://stackoverflow.com/questions/30167205/base64-decode-for-image-jpegbase64-in-android</ins></div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Android/base64&diff=7086&oldid=prev
Admin: ページの作成:「==base64をdecodeして画像へ== String encodedDataString = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFD0lEQVRYR82Yf0yUdRzH348R7TRoHAcp5WiL...」
2018-11-02T03:53:35Z
<p>ページの作成:「==base64をdecodeして画像へ== String encodedDataString = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFD0lEQVRYR82Yf0yUdRzH348R7TRoHAcp5WiL...」</p>
<p><b>新規ページ</b></p><div>==base64をdecodeして画像へ==<br />
String encodedDataString = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFD0lEQVRYR82Yf0yUdRzH348R7TRoHAcp5WiLCcpugkthLTZwMC4oB7ogHE2kMGFJp0k15iCojIFhQOJc/qDEEpRSnEDJIr3+gAqcMhKWrViTQAjaOe9aZ37aA9w9v597jgPn89/d89z3Xs/7+/m8P5/Pl8F9fjEsH9n7qSb3CFZUVCMldNH0d95ef9/4jez65Vim8/FqPYbsQ/RhVDh2DwG+2IgvR07juRDvIMneTZm6WDQDSN22D9u3ZyA5ejl8GcZjWKY8AlQyyOk1F8g/2z6h7vAtSH/Sd3ZHuilPF4vD/G1IeAOttcXYYAz0CJJ5BSDBQvBMyYnOMjIkluLNy1ZURvsrA87CJpR/hc+L07DMR5uaDE32kFkfgxpR0GlR0gnH/rTsshWlTkCrhUz+cfhaIZAXowCnhz9CSuiM4mrXzBvPAZIPJwGkCbIcq8HHue9Ox6HctQjRODb4PbZELFGFdN30BPLOtYPkszJf8L98BZ03iGw02H4U5pTXZNVkd+nceAuSg5S3W0CvFZIco9T00lK8eJJjlAN0gdp/pYYd67H18LBUzPh6jHTlI0QhwyXyaoW8S6PUnMVBqgFOhxE56MrBXEQVHJdAmhquoSNnpexWy345F0h3gE6qgfo0iiw4I4D0QSK+mLiAFwzSrVYMUE8gTzyzFAP7rahYN2MzrLotZZ8iYOtOJIoylWiCTqUakNEmEnJbO/49ZJKYuWoGsSWwLNmIdy4JFxNbELt9Dvi4Fieezey3jGFn3KPCWL/ZTk8FP4te3rJsVp8a6cOmEKGKzK48Mz1k0EnigrHZ8F9gIGxNJagbkMa2mk+ypY5fSer6bdhhXCyA/Lk6nlbt+k6wsKnhOjpywgTPsR/InVkq3VeCFAOyxnzx1gGs9ePUYVXO9I8T+uSGI5g6m4sAXkZ7BciCy0HK/XlobT+GC42c75KD2l5+EKlHuddn1/pmqgXxAdyLeA0oB8kmQlOWQeCTfihC951KRPJq8ERbIRlSalUNf14A5SDFPsk+U9VnQ9EaLhbp90Zinsi+N4BaIMVeSfY+ytOtEbRl4mfmTUGnDOKY5CtZM3Qbr4dzzQFNniFGnyZQUByr8w6opCRr5j/ut6J21syny5+Mgm//MImKdXpXMi0IoHzi2Mj6jw6P6LgMvXujmdY+liEw7PI+G0p4cbpggEoWxN/Pe5rFH3R0wGE2gT/fqEGy5bGz8HEk1Y25mNmm4fz4BUF/OG8KVvY7UBTWC7MuVtP4wJ/8XITx9RjvykcQv5JkYDWNJ+hlq9kDf3Wh86q2Qui0B61dkJyZxxwaRM+rEZJarEowUJ9NkQWNbikFQ5PGGYdvQWw30zjci82igwO3UxVLpgVSYsKeQtpO4PbZzVgiav01AWqBlB2aNEKyw9XULV/o/aXHJJoB3UEqtfxaY1IphjwCVINUnepuNhETnClh0HI44DGgEqQS4OjVFno/a5NsV67FzOcEKAcpyGKy0XVLKxqrSlF2bsitA6gpOWdAMaQnZzNyxEqQXgHyIQWAoqFJAJR9AD+9tQLHjUmyFefk8GfYGPqwoJtxuwXuHrhSXUCXkva5Jjfx0MT+nq2ze1trYH5+1fR4SpMWMuvjJJB7vh3De+u5MdVrBeXgydpDJv+YmQOj1emo2rMbOelPI0h0Jii2oGLLGPaKZuiFAXT8QRfP/4LgKCPCQg2qR79OSD+Rcs4XXxBAdyHhyf37HvB/p8f6RxVAzkUAAAAASUVORK5CYII=";<br />
<br />
encodedDataString = encodedDataString.replace("data:image/png;base64,","");<br />
<br />
byte[] imageAsBytes = Base64.decode(encodedDataString.getBytes(), 0);<br />
<br />
ImageView imgView = findViewById(R.id.image1);<br />
imgView.setImageBitmap(BitmapFactory.decodeByteArray(<br />
imageAsBytes, 0, imageAsBytes.length));<br />
<br />
レイアウト<br />
<ImageView<br />
android:id="@+id/image1"<br />
android:layout_width="match_parent"<br />
android:layout_height="match_parent" /></div>
Admin