# HG changeset patch # User Sebastien Jodogne # Date 1441118476 -7200 # Node ID fd0464ce1962d96a76fec62c2cf364e5e5247608 # Parent 1f5d6a2f9638d7fc0fadac129ec70bf611a9af0f fix diff -r 1f5d6a2f9638 -r fd0464ce1962 Core/ImageFormats/ImageAccessor.h --- a/Core/ImageFormats/ImageAccessor.h Tue Sep 01 14:57:13 2015 +0200 +++ b/Core/ImageFormats/ImageAccessor.h Tue Sep 01 16:41:16 2015 +0200 @@ -54,6 +54,10 @@ AssignEmpty(PixelFormat_Grayscale8); } + virtual ~ImageAccessor() + { + } + bool IsReadOnly() const { return readOnly_; diff -r 1f5d6a2f9638 -r fd0464ce1962 Core/ImageFormats/JpegReader.cpp --- a/Core/ImageFormats/JpegReader.cpp Tue Sep 01 14:57:13 2015 +0200 +++ b/Core/ImageFormats/JpegReader.cpp Tue Sep 01 16:41:16 2015 +0200 @@ -39,11 +39,6 @@ namespace Orthanc { - JpegReader::JpegReader() - { - } - - static void Uncompress(struct jpeg_decompress_struct& cinfo, std::string& content, ImageAccessor& accessor) diff -r 1f5d6a2f9638 -r fd0464ce1962 Core/ImageFormats/JpegReader.h --- a/Core/ImageFormats/JpegReader.h Tue Sep 01 14:57:13 2015 +0200 +++ b/Core/ImageFormats/JpegReader.h Tue Sep 01 16:41:16 2015 +0200 @@ -44,8 +44,6 @@ std::string content_; public: - JpegReader(); - void ReadFromFile(const char* filename); void ReadFromFile(const std::string& filename) diff -r 1f5d6a2f9638 -r fd0464ce1962 Plugins/Engine/OrthancPlugins.cpp --- a/Plugins/Engine/OrthancPlugins.cpp Tue Sep 01 14:57:13 2015 +0200 +++ b/Plugins/Engine/OrthancPlugins.cpp Tue Sep 01 16:41:16 2015 +0200 @@ -1466,8 +1466,8 @@ case _OrthancPluginService_FreeImage: { - const _OrthancPluginGetImageInfo& p = *reinterpret_cast(parameters); - delete reinterpret_cast(p.image); + const _OrthancPluginFreeImage& p = *reinterpret_cast(parameters); + delete reinterpret_cast(p.image); return true; } diff -r 1f5d6a2f9638 -r fd0464ce1962 Plugins/Include/orthanc/OrthancCPlugin.h --- a/Plugins/Include/orthanc/OrthancCPlugin.h Tue Sep 01 14:57:13 2015 +0200 +++ b/Plugins/Include/orthanc/OrthancCPlugin.h Tue Sep 01 16:41:16 2015 +0200 @@ -2923,6 +2923,13 @@ } + + + typedef struct + { + OrthancPluginImage* image; + } _OrthancPluginFreeImage; + /** * @brief Free an image. * @@ -2936,8 +2943,7 @@ OrthancPluginContext* context, OrthancPluginImage* image) { - _OrthancPluginGetImageInfo params; - memset(¶ms, 0, sizeof(params)); + _OrthancPluginFreeImage params; params.image = image; context->InvokeService(context, _OrthancPluginService_FreeImage, ¶ms);