title: convert base64 to bitmap
body: <p>I try to convert a base64 string to bitmap but then i get a black image..
  This is the script that i use to decode:</p>
  
  <pre><code>function Base64ToBitmap(const S: string): TBitmap;
  var
  SS: TStringStream;
  V: string;
  begin
  V := Decode(S);
  SS := TStringStream.Create(V);
  try
  Result := TBitmap.Create;
  Result.LoadFromStream(SS);
  finally
  SS.Free;
  end;
  end;
  </code></pre>
  
  <p>This is the decode script:</p>
  
  <pre><code>function Decode(const Input: AnsiString): string;
  var
    bytes: TBytes;
    utf8: UTF8String;
  begin
    bytes := EncdDecd.DecodeBase64(Input);
    SetLength(utf8, Length(bytes));
    Move(Pointer(bytes)^, Pointer(utf8)^, Length(bytes));
    Result := string(utf8);
  end;
  </code></pre>
  
  <p>BitMap to base64</p>
  
  <pre><code>function BitmapToBase64(ABitmap: TBitmap): string;
  var
  SS: TStringStream;
  V: string;
  begin
  SS := TStringStream.Create('');
  try
  ABitmap.SaveToStream(SS);
  V := SS.DataString;
  Result := Encode(V);
  finally
  SS.Free;
  end;
  end;
  </code></pre>
  
  <p>Encode:</p>
  
  <pre><code>function Encode(const Input: string): AnsiString;
  var
    utf8: UTF8String;
  begin
    utf8 := UTF8String(Input);
    Result := EncdDecd.EncodeBase64(PAnsiChar(utf8), Length(utf8));
  end;
  </code></pre>
  
  <p>Why i get a black screen? the base64 string is a screenshot.</p>