How to set padding for base64 encoding

Andrea Fontana via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Apr 7 05:28:37 PDT 2016


On Thursday, 7 April 2016 at 12:24:06 UTC, Suliman wrote:
> On Thursday, 7 April 2016 at 12:19:48 UTC, Kagamin wrote:
>> Create a range that would remove the newline characters from 
>> string, then decode from that.
>
> std.file.write("output.png", Base64.decode(myimg.chomp));
>
> The same error

Anyway if you need to import a file inside your code probabily 
import works better.
Something like:


auto mystring = import("file.png");

So you don't need any decoding at runtime.


More information about the Digitalmars-d-learn mailing list