changeset 2919:2ca9cd064b15

PamReader::ReadFromMemory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Nov 2018 15:41:21 +0100
parents 7791eac62572
children ad0e7def3338
files Core/Images/PamReader.cpp Core/Images/PamReader.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Images/PamReader.cpp	Mon Nov 05 13:24:16 2018 +0100
+++ b/Core/Images/PamReader.cpp	Tue Nov 06 15:41:21 2018 +0100
@@ -244,4 +244,11 @@
     content_ = buffer;
     ParseContent();
   }
+
+  void PamReader::ReadFromMemory(const void* buffer,
+                                 size_t size)
+  {
+    content_.assign(reinterpret_cast<const char*>(buffer), size);
+    ParseContent();
+  }
 }
--- a/Core/Images/PamReader.h	Mon Nov 05 13:24:16 2018 +0100
+++ b/Core/Images/PamReader.h	Tue Nov 06 15:41:21 2018 +0100
@@ -54,5 +54,8 @@
 #endif
 
     void ReadFromMemory(const std::string& buffer);
+
+    void ReadFromMemory(const void* buffer,
+                        size_t size);
   };
 }