diff OrthancFramework/Sources/Images/IImageWriter.cpp @ 4311:cb9aef006229

turning IImageWriter into a pure interface
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Nov 2020 15:07:55 +0100
parents 2ae905070221
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/IImageWriter.cpp	Mon Nov 09 14:40:51 2020 +0100
+++ b/OrthancFramework/Sources/Images/IImageWriter.cpp	Mon Nov 09 15:07:55 2020 +0100
@@ -42,19 +42,21 @@
   }
 #endif
 
-  void IImageWriter::WriteToMemory(std::string &compressed,
+  void IImageWriter::WriteToMemory(IImageWriter& writer,
+                                   std::string &compressed,
                                    const ImageAccessor &accessor)
   {
-    WriteToMemoryInternal(compressed, accessor.GetWidth(), accessor.GetHeight(),
-                          accessor.GetPitch(), accessor.GetFormat(), accessor.GetConstBuffer());
+    writer.WriteToMemoryInternal(compressed, accessor.GetWidth(), accessor.GetHeight(),
+                                 accessor.GetPitch(), accessor.GetFormat(), accessor.GetConstBuffer());
   }
 
 #if ORTHANC_SANDBOXED == 0
-  void IImageWriter::WriteToFile(const std::string &path,
+  void IImageWriter::WriteToFile(IImageWriter& writer,
+                                 const std::string &path,
                                  const ImageAccessor &accessor)
   {
-    WriteToFileInternal(path, accessor.GetWidth(), accessor.GetHeight(),
-                        accessor.GetPitch(), accessor.GetFormat(), accessor.GetConstBuffer());
+    writer.WriteToFileInternal(path, accessor.GetWidth(), accessor.GetHeight(),
+                               accessor.GetPitch(), accessor.GetFormat(), accessor.GetConstBuffer());
   }
 #endif
 }