procedure Hex2Png(str: string; out png: TPngObject); var stream: TMemoryStream; begin if not Assigned(png) then png := TPngObject.Create; stream := TMemoryStream.Create; stream.SetSize(Length(str) ); HexToBin(PChar(str), stream.Memory, stream.Size);…