javascriptで変数に入った画像のバイナリデータを表示したいと思っています。 画像のバイナリデータは http://developer.mozilla.org/en/docs/Storage を使って、ローカルのsqliteのDBから画像データを取得しています。 そのデータをbase64でエンコードして、(それをthe_data とする) img.src = 'data:image/jpeg;base64,' + the_data; のようにして、画像を表示させたいと思っています。 javascriptでこのようなことは可能でしょうか? というか、うまくいかないので、教えてください。 perlでは以下でできました。 --- use DBI; use MIME::Base64; my $dbh = DBI->connect('dbi:SQLite:dbname=test.db','',